summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiangyu Chen <xiangyu.chen@windriver.com>2024-01-07 20:56:09 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-01-19 14:29:24 +0000
commit664e3573d4b178bbbf6e080b7b7f2477853d1fbd (patch)
tree647022a05bc7c5b733052690160d59d366eba68c
parente4e20721887f91dd43bd47ce8e897b8629c57e0e (diff)
downloadmeta-virtualization-664e3573d4b178bbbf6e080b7b7f2477853d1fbd.tar.gz
lxc: adjust the lxc-test-unpriv running order
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 <xiangyu.chen@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/lxc/files/run-ptest25
1 files changed, 24 insertions, 1 deletions
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"
16blacklist="$blacklist lxc-test-shutdowntest" 16blacklist="$blacklist lxc-test-shutdowntest"
17blacklist="$blacklist lxc-test-state-server" 17blacklist="$blacklist lxc-test-state-server"
18 18
19# Tests in firstrunlist will be run first
20firstrunlist=""
21firstrunlist="$firstrunlist lxc-test-unpriv"
22
19passed=0 23passed=0
20failed=0 24failed=0
21skipped=0 25skipped=0
@@ -26,11 +30,29 @@ rm -f logs/*
26 30
27echo "### Starting LXC ptest ###" 31echo "### Starting LXC ptest ###"
28 32
33for test in $firstrunlist
34do
35 ./tests/$test >logs/$(basename $test).log 2>&1
36 if [ $? -eq 0 ]
37 then
38 echo "PASS: $(basename $test)"
39 passed=$((passed+1))
40 else
41 echo "FAIL: $(basename $test)"
42 failed=$((failed+1))
43 fi
44done
45
29for test in ./tests/* 46for test in ./tests/*
30do 47do
31 if [[ ! $blacklist = *$(basename $test)* ]] 48 if [[ ! $blacklist = *$(basename $test)* ]]
32 then 49 then
33 $test >logs/$(basename $test).log 2>&1 50 if [[ ! $firstrunlist = *$(basename $test)* ]]
51 then
52 $test >logs/$(basename $test).log 2>&1
53 else
54 continue;
55 fi
34 else 56 else
35 echo "SKIPPED: $(basename $test)" 57 echo "SKIPPED: $(basename $test)"
36 skipped=$((skipped+1)) 58 skipped=$((skipped+1))
@@ -47,6 +69,7 @@ do
47 fi 69 fi
48done 70done
49 71
72
50echo "" 73echo ""
51echo "Results:" 74echo "Results:"
52echo " PASSED = $passed" 75echo " PASSED = $passed"