diff options
| author | Xiangyu Chen <xiangyu.chen@windriver.com> | 2024-01-07 20:56:09 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-01-19 14:29:24 +0000 |
| commit | 664e3573d4b178bbbf6e080b7b7f2477853d1fbd (patch) | |
| tree | 647022a05bc7c5b733052690160d59d366eba68c | |
| parent | e4e20721887f91dd43bd47ce8e897b8629c57e0e (diff) | |
| download | meta-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-ptest | 25 |
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" | |||
| 16 | blacklist="$blacklist lxc-test-shutdowntest" | 16 | blacklist="$blacklist lxc-test-shutdowntest" |
| 17 | blacklist="$blacklist lxc-test-state-server" | 17 | blacklist="$blacklist lxc-test-state-server" |
| 18 | 18 | ||
| 19 | # Tests in firstrunlist will be run first | ||
| 20 | firstrunlist="" | ||
| 21 | firstrunlist="$firstrunlist lxc-test-unpriv" | ||
| 22 | |||
| 19 | passed=0 | 23 | passed=0 |
| 20 | failed=0 | 24 | failed=0 |
| 21 | skipped=0 | 25 | skipped=0 |
| @@ -26,11 +30,29 @@ rm -f logs/* | |||
| 26 | 30 | ||
| 27 | echo "### Starting LXC ptest ###" | 31 | echo "### Starting LXC ptest ###" |
| 28 | 32 | ||
| 33 | for test in $firstrunlist | ||
| 34 | do | ||
| 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 | ||
| 44 | done | ||
| 45 | |||
| 29 | for test in ./tests/* | 46 | for test in ./tests/* |
| 30 | do | 47 | do |
| 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 |
| 48 | done | 70 | done |
| 49 | 71 | ||
| 72 | |||
| 50 | echo "" | 73 | echo "" |
| 51 | echo "Results:" | 74 | echo "Results:" |
| 52 | echo " PASSED = $passed" | 75 | echo " PASSED = $passed" |
