Browse Source

Add back in the Env backup restore around each platforms tests (#11980)

Chris Pepper 6 years ago
parent
commit
6b1967ed33
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      buildroot/share/tests/start_tests

+ 4
- 2
buildroot/share/tests/start_tests View File

18
 }
18
 }
19
 export -f exec_test
19
 export -f exec_test
20
 
20
 
21
-env_backup
22
 printf "Running \033[0;32m$2\033[0m Tests\n"
21
 printf "Running \033[0;32m$2\033[0m Tests\n"
23
 
22
 
24
 if [[ $3 = "--deep-clean" ]]; then
23
 if [[ $3 = "--deep-clean" ]]; then
30
   dir_list=("$(dirname "${BASH_SOURCE[0]}")"/*)
29
   dir_list=("$(dirname "${BASH_SOURCE[0]}")"/*)
31
   declare -a tests=(${dir_list[@]/*start_tests/})
30
   declare -a tests=(${dir_list[@]/*start_tests/})
32
   for f in "${tests[@]}"; do
31
   for f in "${tests[@]}"; do
32
+    env_backup
33
     testenv=$(basename $f | cut -d"_" -f1)
33
     testenv=$(basename $f | cut -d"_" -f1)
34
     printf "Running \033[0;32m$f\033[0m Tests\n"
34
     printf "Running \033[0;32m$f\033[0m Tests\n"
35
     exec_test $1 "$testenv --target clean" "Setup Build Environment"
35
     exec_test $1 "$testenv --target clean" "Setup Build Environment"
36
     $f $1 $testenv
36
     $f $1 $testenv
37
+    env_restore
37
   done
38
   done
38
 else
39
 else
40
+  env_backup
39
   exec_test $1 "$2 --target clean" "Setup Build Environment"
41
   exec_test $1 "$2 --target clean" "Setup Build Environment"
40
   $2_tests $1 $2
42
   $2_tests $1 $2
43
+  env_restore
41
 fi
44
 fi
42
 printf "\033[0;32mAll tests completed successfully\033[0m\n"
45
 printf "\033[0;32mAll tests completed successfully\033[0m\n"
43
-env_restore

Loading…
Cancel
Save