Skip to contentSkip to conversation

configure: Enable out-of-tree acceptance tests

PATCH Applied Philippe Mathieu-Daudé 2 participants 2 messages Jun 12, 2018 – Jun 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Enable out-of-tree acceptance tests

Currently to run Avocado acceptance tests in an out-of-tree build directory, we need to use the full path to the test:

build_dir$ avocado run /full/path/to/sources/qemu/tests/acceptance/boot_linux_console.py

This patch adds a symlink in the build tree to simplify the tests invocation, allowing the same command than in in-tree builds:

build_dir$ avocado run tests/acceptance/boot_linux_console.py

---
Based-on: [email protected]

Since RFC: reworded the commit message (Eduardo Habkost)

 configure | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
configure +5 -3
index a8c4094c87..d095ed45a4 100755
@@ -7239,9 +7239,11 @@ for rom in seabios vgabios ; do
 done
 
 # set up tests data directory
-if [ ! -e tests/data ]; then
-    symlink "$source_path/tests/data" tests/data
-fi
+for tests_subdir in acceptance data; do
+    if [ ! -e tests/$tests_subdir ]; then
+        symlink "$source_path/tests/$tests_subdir" tests/$tests_subdir
+    fi
+done
 
 # set up qemu-iotests in this build directory
 iotests_common_env="tests/qemu-iotests/common.env"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé

Currently to run Avocado acceptance tests in an out-of-tree build directory, we need to use the full path to the test:

build_dir$ avocado run /full/path/to/sources/qemu/tests/acceptance/boot_linux_console.py

This patch adds a symlink in the build tree to simplify the tests invocation, allowing the same command than in in-tree builds:

build_dir$ avocado run tests/acceptance/boot_linux_console.py

Queued on python-next, thanks!

Signature · 1 line
Eduardo