From: Xiangyu Chen <[email protected]> Some of lxc test cases can not full clean the system environment, that cause lxc-test-unpriv cannot execute successfully.
Since those code in lxc are using for tests, so just adjust the cases order. Signed-off-by: Xiangyu Chen <[email protected]> --- recipes-containers/lxc/files/run-ptest | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/recipes-containers/lxc/files/run-ptest b/recipes-containers/lxc/files/run-ptest index 2e5af3c3..196adb04 100644 --- a/recipes-containers/lxc/files/run-ptest +++ b/recipes-containers/lxc/files/run-ptest @@ -16,6 +16,10 @@ blacklist="$blacklist lxc-test-get_item" blacklist="$blacklist lxc-test-shutdowntest" blacklist="$blacklist lxc-test-state-server" +# Tests in firstrunlist will be run first +firstrunlist="" +firstrunlist="$firstrunlist lxc-test-unpriv" + passed=0 failed=0 skipped=0 @@ -26,11 +30,29 @@ rm -f logs/* echo "### Starting LXC ptest ###" +for test in $firstrunlist +do + ./tests/$test >logs/$(basename $test).log 2>&1 + if [ $? -eq 0 ] + then + echo "PASS: $(basename $test)" + passed=$((passed+1)) + else + echo "FAIL: $(basename $test)" + failed=$((failed+1)) + fi +done + for test in ./tests/* do if [[ ! $blacklist = *$(basename $test)* ]] then - $test >logs/$(basename $test).log 2>&1 + if [[ ! $firstrunlist = *$(basename $test)* ]] + then + $test >logs/$(basename $test).log 2>&1 + else + continue; + fi else echo "SKIPPED: $(basename $test)" skipped=$((skipped+1)) @@ -47,6 +69,7 @@ do fi done + echo "" echo "Results:" echo " PASSED = $passed" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8529): https://lists.yoctoproject.org/g/meta-virtualization/message/8529 Mute This Topic: https://lists.yoctoproject.org/mt/103576951/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
