aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisa Nguyen <lisa.nguyen@linaro.org>2014-08-20 17:26:04 -0700
committerLisa Nguyen <lisa.nguyen@linaro.org>2014-09-10 15:03:30 -0700
commitd713d633fe45d83aaf5f95c54120877cfbae5cf1 (patch)
tree00c6e6fcc46b846e47f8828529d2b03c1bcd1c51
parent523e8d9c5a271939ea1ed9f8351fb69c86c9f605 (diff)
Display all skipped test results in LAVA
Allow LAVA to record all the skipped test cases including the ones that will not be executed due to failed sanity checks. This enhancement will keep the number of PM-QA results more consistent across multiple platforms. Fix for Bug #386: https://bugs.linaro.org/show_bug.cgi?id=386 Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
-rw-r--r--Test.mk5
-rwxr-xr-xcpufreq/cpufreq_06.sh2
-rwxr-xr-xcpufreq/cpufreq_08.sh2
-rwxr-xr-xcpufreq/cpufreq_09.sh2
-rwxr-xr-xcpufreq/cpufreq_sanity.sh1
-rwxr-xr-xcpuhotplug/cpuhotplug_sanity.sh2
-rwxr-xr-xcpuidle/cpuidle_sanity.sh1
-rw-r--r--include/functions.sh11
-rwxr-xr-xthermal/thermal_sanity.sh1
9 files changed, 22 insertions, 5 deletions
diff --git a/Test.mk b/Test.mk
index df9cd62..66fe44b 100644
--- a/Test.mk
+++ b/Test.mk
@@ -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