diff --git a/automation/scripts/build b/automation/scripts/build index cdb8cd7c72..0e7494ff6d 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -109,6 +109,5 @@ else # even though dist/ contains everything, while some containers don't even # build Xen (cd dist/install; find | cpio -o -H newc | gzip) > binaries/xen-tools.cpio.gz - cp -r tools/tests binaries/ collect_xen_artefacts fi diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index 6c4c9668f9..8e86940c6e 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -136,7 +136,7 @@ done passed="test passed" domU_check="" dom0_check=" -/tests/run-tools-tests /tests /tmp/tests-junit.xml && echo \"${passed}\" +/root/run-tools-tests /usr/lib/xen/tests /tmp/tests-junit.xml && echo \"${passed}\" nc -l -p 8080 < /tmp/tests-junit.xml >/dev/null & " if [ "${test_variant}" = "tools-tests-pvh" ]; then @@ -195,9 +195,8 @@ cat binaries/xen-tools.cpio.gz >> binaries/dom0-rootfs.cpio.gz # test-local configuration mkdir -p rootfs cd rootfs -mkdir -p boot etc/local.d -cp -ar ../binaries/tests . -cp -a ../automation/scripts/run-tools-tests tests/ +mkdir -p boot etc/local.d root +cp -a ../automation/scripts/run-tools-tests root/ echo "#!/bin/bash diff --git a/automation/scripts/run-tools-tests b/automation/scripts/run-tools-tests index 770e97c3e9..2bca1589db 100755 --- a/automation/scripts/run-tools-tests +++ b/automation/scripts/run-tools-tests @@ -12,30 +12,25 @@ printf '\n' > "$xml_out" printf '\n' >> "$xml_out" printf ' \n' >> "$xml_out" failed= -for dir in "$1"/*; do - [ -d "$dir" ] || continue - echo "Running test in $dir" - printf ' \n' "$dir" >> "$xml_out" - ret= - for f in "$dir"/*; do - [ -f "$f" ] || continue - [ -x "$f" ] || continue - "$f" 2>&1 | tee /tmp/out - ret=$? - if [ "$ret" -ne 0 ]; then - echo "FAILED: $ret" - failed+=" $dir" - printf ' \n' "$f" "$ret" >> "$xml_out" - # TODO: could use xml escaping... but current tests seems to - # produce sane output - cat /tmp/out >> "$xml_out" - printf ' \n' >> "$xml_out" - else - echo "PASSED" - fi - done - if [ -z "$ret" ]; then - printf ' \n' "$dir" >> "$xml_out" +for f in "$1"/*; do + if [ ! -x "$f" ]; then + echo "SKIP: $f not executable" + continue + fi + echo "Running $f" + printf ' \n' "$f" >> "$xml_out" + "$f" 2>&1 | tee /tmp/out + ret=$? + if [ "$ret" -ne 0 ]; then + echo "FAILED: $f" + failed+=" $f" + printf ' \n' "$f" "$ret" >> "$xml_out" + # TODO: could use xml escaping... but current tests seems to + # produce sane output + cat /tmp/out >> "$xml_out" + printf ' \n' >> "$xml_out" + else + echo "PASSED" fi printf ' \n' >> "$xml_out" done