From acb1e6db849151ef6e271027904b6cfea2d5880c Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Mon, 14 Dec 2020 12:12:10 +0100
Subject: [PATCH] configure: move tests/qemu-iotests/common.env generation to
 meson

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                        | 7 -------
 tests/qemu-iotests/common.env.in | 3 +++
 tests/qemu-iotests/meson.build   | 3 +++
 3 files changed, 6 insertions(+), 7 deletions(-)
 create mode 100644 tests/qemu-iotests/common.env.in

diff --git a/configure b/configure
index bccd797cbc0..5860bdb77ba 100755
--- a/configure
+++ b/configure
@@ -6433,13 +6433,6 @@ for rom in seabios; do
     echo "RANLIB=$ranlib" >> $config_mak
 done
 
-# set up qemu-iotests in this build directory
-iotests_common_env="tests/qemu-iotests/common.env"
-
-echo "# Automatically generated by configure - do not modify" > "$iotests_common_env"
-echo >> "$iotests_common_env"
-echo "export PYTHON='$python'" >> "$iotests_common_env"
-
 if test "$skip_meson" = no; then
 cross="config-meson.cross.new"
 meson_quote() {
diff --git a/tests/qemu-iotests/common.env.in b/tests/qemu-iotests/common.env.in
new file mode 100644
index 00000000000..e565cdf40c4
--- /dev/null
+++ b/tests/qemu-iotests/common.env.in
@@ -0,0 +1,3 @@
+# Automatically generated by configure - do not modify
+
+export PYTHON='@PYTHON@'
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
index 67aed1e4927..26658ce25ce 100644
--- a/tests/qemu-iotests/meson.build
+++ b/tests/qemu-iotests/meson.build
@@ -3,3 +3,6 @@ if 'CONFIG_LINUX' in config_host
 else
     socket_scm_helper = []
 endif
+configure_file(output: 'common.env',
+               input: files('common.env.in'),
+               configuration: {'PYTHON': python.full_path()})
-- 
GitLab