aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHongbo Zhang <hongbo.zhang@linaro.org>2013-02-04 19:22:58 +0800
committerHongbo Zhang <hongbo.zhang@linaro.org>2013-02-06 10:40:26 +0800
commit974802b87b3662cf224f38db8059add7869cfdb4 (patch)
treea0e793fabce8622d98d65ef396de93a6ba47f5b3
parent7d60a026b9712cc26b2a5cd049296fbc4499c666 (diff)
pm-qa: collecting seperated test switches into one central file.
It is inconvenient for user to edit these seperated switches, so move them into one central file. Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
-rw-r--r--Switches11
-rw-r--r--include/functions.sh2
-rwxr-xr-xsuspend/suspend_01.sh5
-rwxr-xr-xsuspend/suspend_02.sh5
-rwxr-xr-xsuspend/suspend_03.sh5
-rwxr-xr-xsuspend/suspend_04.sh5
-rwxr-xr-xsuspend/suspend_05.sh4
-rwxr-xr-xthermal/thermal_06.sh4
8 files changed, 19 insertions, 22 deletions
diff --git a/Switches b/Switches
new file mode 100644
index 0000000..3a46ffe
--- /dev/null
+++ b/Switches
@@ -0,0 +1,11 @@
+# These are switches to enable/disable some tests.
+
+# Thermal tests
+thermal_try_max=0
+
+# Suspend tests
+suspend_dbus=0
+suspend_pmsuspend=1
+suspend_mem=1
+suspend_ac=0
+suspend_power=0
diff --git a/include/functions.sh b/include/functions.sh
index c39b6b7..7ee809b 100644
--- a/include/functions.sh
+++ b/include/functions.sh
@@ -23,6 +23,8 @@
# - initial API and implementation
#
+source ../Switches
+
CPU_PATH="/sys/devices/system/cpu"
TEST_NAME=$(basename ${0%.sh})
PREFIX=$TEST_NAME
diff --git a/suspend/suspend_01.sh b/suspend/suspend_01.sh
index d67a66b..e591dc9 100755
--- a/suspend/suspend_01.sh
+++ b/suspend/suspend_01.sh
@@ -29,10 +29,7 @@
source ../include/functions.sh
source ../include/suspend_functions.sh
-# test_dbus: switch on/off this test
-test_dbus=1
-
-if [ "$test_dbus" -eq 0 ]; then
+if [ "$suspend_dbus" -eq 0 ]; then
log_skip "dbus message suspend test not enabled"
exit 0
fi
diff --git a/suspend/suspend_02.sh b/suspend/suspend_02.sh
index 7e33624..5e41d08 100755
--- a/suspend/suspend_02.sh
+++ b/suspend/suspend_02.sh
@@ -29,10 +29,7 @@
source ../include/functions.sh
source ../include/suspend_functions.sh
-# test_pmsuspend: switch on/off this test
-test_pmsuspend=1
-
-if [ "$test_pmsuspend" -eq 0 ]; then
+if [ "$suspend_pmsuspend" -eq 0 ]; then
log_skip "pm-suspend test not enabled"
exit 0
fi
diff --git a/suspend/suspend_03.sh b/suspend/suspend_03.sh
index 64f2fa1..b71966c 100755
--- a/suspend/suspend_03.sh
+++ b/suspend/suspend_03.sh
@@ -29,10 +29,7 @@
source ../include/functions.sh
source ../include/suspend_functions.sh
-# test_mem: switch on/off this test
-test_mem=1
-
-if [ "$test_mem" -eq 0 ]; then
+if [ "$suspend_mem" -eq 0 ]; then
log_skip "suspend to ram via sysfs not enabled"
exit 0
fi
diff --git a/suspend/suspend_04.sh b/suspend/suspend_04.sh
index 9f85400..8947afd 100755
--- a/suspend/suspend_04.sh
+++ b/suspend/suspend_04.sh
@@ -29,10 +29,7 @@
source ../include/functions.sh
source ../include/suspend_functions.sh
-# test_ac: switch on/off this test
-test_ac=0
-
-if [ "$test_ac" -eq 0 ]; then
+if [ "$suspend_ac" -eq 0 ]; then
log_skip "suspend test involving ac power remove"
exit 0
fi
diff --git a/suspend/suspend_05.sh b/suspend/suspend_05.sh
index 8604331..a87490c 100755
--- a/suspend/suspend_05.sh
+++ b/suspend/suspend_05.sh
@@ -29,11 +29,9 @@
source ../include/functions.sh
source ../include/suspend_functions.sh
-# test_power: switch on/off this test
-test_power=0
args_power_sleep=60
-if [ "$test_power" -eq 0 ]; then
+if [ "$suspend_power" -eq 0 ]; then
log_skip "battery consumption test while suspend"
exit 0
fi
diff --git a/thermal/thermal_06.sh b/thermal/thermal_06.sh
index 28fdaec..0084281 100755
--- a/thermal/thermal_06.sh
+++ b/thermal/thermal_06.sh
@@ -28,9 +28,7 @@
source ../include/functions.sh
source ../include/thermal_functions.sh
-# test_switch: switch on/off this test
-test_switch=0
-if [ "$test_switch" -eq 0 ]; then
+if [ "$thermal_try_max" -eq 0 ]; then
log_skip "test of trip points being crossed"
exit 0
fi