diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-08-28 15:07:34 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-09-08 11:43:16 +0200 |
commit | 4fbcdcd74237549d2d30facf670bf0006bcf5ea9 (patch) | |
tree | 933701785509d803676de76a5f9ce09dccc145a7 /tests/migration | |
parent | 3909def82a699e4d628c07df948b4dd2656610ea (diff) |
meson: convert migration/initrd-stress
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200828110734.1638685-17-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/migration')
-rwxr-xr-x | tests/migration/initrd-stress.sh | 10 | ||||
-rw-r--r-- | tests/migration/meson.build | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/migration/initrd-stress.sh b/tests/migration/initrd-stress.sh new file mode 100755 index 0000000000..0f20ac29a6 --- /dev/null +++ b/tests/migration/initrd-stress.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +INITRD="$1" +STRESS="$2" + +INITRD_DIR=$(mktemp -d -p '' "initrd-stress.XXXXXX") +trap 'rm -rf $INITRD_DIR' EXIT + +cp "$STRESS" "$INITRD_DIR/init" +(cd "$INITRD_DIR" && (find | cpio --quiet -o -H newc | gzip -9)) > "$INITRD" diff --git a/tests/migration/meson.build b/tests/migration/meson.build new file mode 100644 index 0000000000..f215ee7d3a --- /dev/null +++ b/tests/migration/meson.build @@ -0,0 +1,14 @@ +stress = executable( + 'stress', + files('stress.c'), + dependencies: [glib], + link_args: ['-static'], + build_by_default: false, +) + +custom_target( + 'initrd-stress.img', + output: 'initrd-stress.img', + input: stress, + command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'] +) |