diff options
-rw-r--r-- | Test.mk | 5 | ||||
-rwxr-xr-x | cpufreq/cpufreq_06.sh | 2 | ||||
-rwxr-xr-x | cpufreq/cpufreq_08.sh | 2 | ||||
-rwxr-xr-x | cpufreq/cpufreq_09.sh | 2 | ||||
-rwxr-xr-x | cpufreq/cpufreq_sanity.sh | 1 | ||||
-rwxr-xr-x | cpuhotplug/cpuhotplug_sanity.sh | 2 | ||||
-rwxr-xr-x | cpuidle/cpuidle_sanity.sh | 1 | ||||
-rw-r--r-- | include/functions.sh | 11 | ||||
-rwxr-xr-x | thermal/thermal_sanity.sh | 1 |
9 files changed, 22 insertions, 5 deletions
@@ -49,8 +49,9 @@ run_tests: uncheck $(EXEC) $(LOG) @echo "###" -@./$< 2> $@ else -run_tests: $(SNT) - @cat $(<:.sh=.txt) +run_tests: + ./$(SNT) +# @cat $(<:.sh=.txt) endif clean: diff --git a/cpufreq/cpufreq_06.sh b/cpufreq/cpufreq_06.sh index 65e824f..e2e708a 100755 --- a/cpufreq/cpufreq_06.sh +++ b/cpufreq/cpufreq_06.sh @@ -104,7 +104,7 @@ check_deviation() { supported=$(cat $CPU_PATH/cpu0/cpufreq/scaling_available_governors | grep "userspace") if [ -z "$supported" ]; then log_skip "userspace not supported" - exit 0 + return 0 fi save_governors diff --git a/cpufreq/cpufreq_08.sh b/cpufreq/cpufreq_08.sh index d9104f6..2250017 100755 --- a/cpufreq/cpufreq_08.sh +++ b/cpufreq/cpufreq_08.sh @@ -69,7 +69,7 @@ save_governors supported=$(cat $CPU_PATH/cpu0/cpufreq/scaling_available_governors | grep "userspace") if [ -z "$supported" ]; then log_skip "userspace not supported" - exit 0 + return 0 fi trap "restore_governors; sigtrap" SIGHUP SIGINT SIGTERM diff --git a/cpufreq/cpufreq_09.sh b/cpufreq/cpufreq_09.sh index 7b65eec..62c953d 100755 --- a/cpufreq/cpufreq_09.sh +++ b/cpufreq/cpufreq_09.sh @@ -65,7 +65,7 @@ save_governors supported=$(cat $CPU_PATH/cpu0/cpufreq/scaling_available_governors | grep "powersave") if [ -z "$supported" ]; then log_skip "powersave not supported" - exit 0 + return 0 fi trap "restore_governors; sigtrap" SIGHUP SIGINT SIGTERM diff --git a/cpufreq/cpufreq_sanity.sh b/cpufreq/cpufreq_sanity.sh index a5dda60..e3518b8 100755 --- a/cpufreq/cpufreq_sanity.sh +++ b/cpufreq/cpufreq_sanity.sh @@ -38,6 +38,7 @@ check_cpufreq_sysfs_entry() { test -d $dirpath if [ $? -ne 0 ]; then echo "cpufreq is not supported. Skipping all cpufreq tests" + skip_tests cpufreq return 0 fi return 1 diff --git a/cpuhotplug/cpuhotplug_sanity.sh b/cpuhotplug/cpuhotplug_sanity.sh index 2ad24ff..9a9df25 100755 --- a/cpuhotplug/cpuhotplug_sanity.sh +++ b/cpuhotplug/cpuhotplug_sanity.sh @@ -37,6 +37,7 @@ check_cpuhotplug_sysfs_entry() { if [ $cpunum -eq 1 ]; then echo "skip test, uniprocessor system" + skip_tests cpuhotplug return 0 fi @@ -46,6 +47,7 @@ check_cpuhotplug_sysfs_entry() { test -f $CPU_PATH/$cpu/online if [ $? -ne 0 ]; then echo "cpuhotplug is not supported. Skipping all cpuhotplug tests" + skip_tests cpuhotplug return 0 fi fi diff --git a/cpuidle/cpuidle_sanity.sh b/cpuidle/cpuidle_sanity.sh index 99f05b3..65fe549 100755 --- a/cpuidle/cpuidle_sanity.sh +++ b/cpuidle/cpuidle_sanity.sh @@ -38,6 +38,7 @@ check_cpuidle_sysfs_entry() { test -d $dirpath if [ $? -ne 0 ]; then echo "cpuidle is not supported. Skipping all cpuidle tests" + skip_tests cpuidle return 0 fi return 1 diff --git a/include/functions.sh b/include/functions.sh index 3163456..ebe96ad 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -60,6 +60,17 @@ test_status_show() { echo " " } +skip_tests() { + dir=$1 + + test_script_list=$(ls ../$1/*.sh | grep -v 'sanity.sh$' | grep -v '00.sh$') + + for test_script in $test_script_list; do + test_case=$(basename $test_script .sh) + echo "$test_case: skip" + done +} + log_begin() { printf "%-76s" "$TEST_NAME.$INC$CPU: $@... " INC=$(($INC+1)) diff --git a/thermal/thermal_sanity.sh b/thermal/thermal_sanity.sh index b995faf..c9149c0 100755 --- a/thermal/thermal_sanity.sh +++ b/thermal/thermal_sanity.sh @@ -37,6 +37,7 @@ check_thermal_zone() { test -d $THERMAL_PATH if [ $? -ne 0 ]; then echo "thermal zone is not available. Skipping all tests" + skip_tests thermal return 0 fi return 1 |