[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 25/39] meson: convert migration/initrd-stress
From: |
Paolo Bonzini |
Subject: |
[PATCH 25/39] meson: convert migration/initrd-stress |
Date: |
Wed, 2 Sep 2020 08:59:03 -0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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>
---
tests/Makefile.include | 14 --------------
tests/meson.build | 1 +
tests/migration/initrd-stress.sh | 10 ++++++++++
tests/migration/meson.build | 14 ++++++++++++++
4 files changed, 25 insertions(+), 14 deletions(-)
create mode 100755 tests/migration/initrd-stress.sh
create mode 100644 tests/migration/meson.build
diff --git a/tests/Makefile.include b/tests/Makefile.include
index fe22ccfcc6..1592a647f4 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -38,20 +38,6 @@ export SRC_PATH
SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
$(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))
-QEMU_CFLAGS += -I$(SRC_PATH)/tests -I$(SRC_PATH)/tests/qtest
-
-tests/migration/stress$(EXESUF): tests/migration/stress.o
- $(call quiet-command, $(LINKPROG) -static -O3 $(PTHREAD_LIB) -o $@ $<
,"LINK","$(TARGET_DIR)$@")
-
-INITRD_WORK_DIR=tests/migration/initrd
-
-tests/migration/initrd-stress.img: tests/migration/stress$(EXESUF)
- mkdir -p $(INITRD_WORK_DIR)
- cp $< $(INITRD_WORK_DIR)/init
- (cd $(INITRD_WORK_DIR) && (find | cpio --quiet -o -H newc | gzip -9)) >
$@
- rm $(INITRD_WORK_DIR)/init
- rmdir $(INITRD_WORK_DIR)
-
SPEED = quick
# gtester tests, possibly with verbose output
diff --git a/tests/meson.build b/tests/meson.build
index 71d0776a79..1e3dd94ac2 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -274,3 +274,4 @@ endif
subdir('qapi-schema')
subdir('qtest')
+subdir('migration')
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@']
+)
--
2.26.2
- [PATCH 20/39] meson: convert atomic*-bench, (continued)
- [PATCH 20/39] meson: convert atomic*-bench, Paolo Bonzini, 2020/09/02
- [PATCH 13/39] meson: declare keyutils dependency, Paolo Bonzini, 2020/09/02
- [PATCH 09/39] ninjatool: use constant names for stamp files, Paolo Bonzini, 2020/09/02
- [PATCH 18/39] meson: remove old socket_scm_helper rule, Paolo Bonzini, 2020/09/02
- [PATCH 17/39] meson: move keyutils dependency check, Paolo Bonzini, 2020/09/02
- [PATCH 04/39] mtest2make: hide output of successful tests, Paolo Bonzini, 2020/09/02
- [PATCH 29/39] Makefile: inline the relevant parts of rules.mak, Paolo Bonzini, 2020/09/02
- [PATCH 26/39] configure: remove dead code for in-tree builds, Paolo Bonzini, 2020/09/02
- [PATCH 31/39] configure: move C++ compiler handling to meson, Paolo Bonzini, 2020/09/02
- [PATCH 22/39] meson: convert the speed tests, Paolo Bonzini, 2020/09/02
- [PATCH 25/39] meson: convert migration/initrd-stress,
Paolo Bonzini <=
- [PATCH 32/39] meson: keep all compiler flags detection together, Paolo Bonzini, 2020/09/02
- [PATCH 34/39] configure: remove unnecessary libm test, Paolo Bonzini, 2020/09/02
- [PATCH 39/39] docs: suggest Meson replacements for various configure functions, Paolo Bonzini, 2020/09/02
- [PATCH 36/39] meson: get glib compilation flags from GLIB_CFLAGS, Paolo Bonzini, 2020/09/02
- [PATCH 16/39] meson: convert the unit tests, Paolo Bonzini, 2020/09/02
- [PATCH 37/39] configure: do not include dependency flags in QEMU_CFLAGS and LIBS, Paolo Bonzini, 2020/09/02
- [PATCH 30/39] configure: move disassembler configuration to meson, Paolo Bonzini, 2020/09/02
- [PATCH 27/39] meson: compute config_all_devices directly, Paolo Bonzini, 2020/09/02
- [PATCH 28/39] Makefile: remove dead variables and includes, Paolo Bonzini, 2020/09/02
- [PATCH 38/39] configure: drop dead variables, Paolo Bonzini, 2020/09/02