@@ -14,5 +14,5 @@ define $(module_name)_add_executable
include $(BUILD_PREBUILT)
endef
-test_num := 01 02 03 04 05 06 07 08 09
+test_num := sanity 01 02 03 04 05 06 07 08 09
$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, $(module_name)_$(item))))
new file mode 100755
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# PM-QA validation test suite for the power management on Linux
+#
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributors:
+# Sanjay Singh Rawat <sanjay.rawat@linaro.org>
+# - initial API and implementation
+#
+
+source ../include/functions.sh
+
+check_cpufreq_sysfs_entry() {
+
+ local dirpath=$CPU_PATH/cpufreq
+
+ test -d $dirpath
+ if [ $? -ne 0 ]; then
+ echo "cpufreq is not enabled. Skipping all cpufreq tests"
+ return 0
+ fi
+ return 1
+}
+
+check_cpufreq_sysfs_entry
new file mode 100644
@@ -0,0 +1 @@
+cpufreq is not supported. Skipping all cpufreq tests...
@@ -14,7 +14,7 @@ define $(module_name)_add_executable
include $(BUILD_PREBUILT)
endef
-test_num := 01 02 03 04 05 06 07 08
+test_num := sanity 01 02 03 04 05 06 07 08
$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, $(module_name)_$(item))))
define $(module_name)_etc_add_executable
new file mode 100755
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# PM-QA validation test suite for the power management on Linux
+#
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributors:
+# Sanjay Singh Rawat <sanjay.rawat@linaro.org>
+# - initial API and implementation
+#
+
+source ../include/functions.sh
+
+check_cpuhotplug_sysfs_entry() {
+
+ cpus=$(ls $CPU_PATH | grep "cpu[0-9].*")
+
+ for cpu in $cpus; do
+ # assuming cpu0 can't be plugged out
+ if [ $cpu != "cpu0" ]; then
+ test -f $CPU_PATH/$cpu/online
+ if [ $? -ne 0 ]; then
+ echo "cpuhotplug is not enabled. Skipping all cpuhotplug tests"
+ return 0
+ fi
+ fi
+ done
+ return 1
+}
+
+check_cpuhotplug_sysfs_entry
new file mode 100644
@@ -0,0 +1 @@
+cpuhotplug is not supported. Skipping all cpuhotplug tests...
@@ -14,7 +14,7 @@ define $(module_name)_add_executable
include $(BUILD_PREBUILT)
endef
-test_num := 01 02 03
+test_num := sanity 01 02 03
$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, $(module_name)_$(item))))
include $(CLEAR_VARS)
@@ -29,8 +29,12 @@ check_cpuidle_sysfs_entry() {
local dirpath=$CPU_PATH/cpuidle
- test -d $dirpath && return 1 || return 0
+ test -d $dirpath
+ if [ $? -ne 0 ]; then
+ echo "cpuidle is not enabled. Skipping all cpuidle tests"
+ return 0
+ fi
+ return 1
}
check_cpuidle_sysfs_entry
-test_status_show
@@ -1 +1 @@
-cpuidle is not enabled. Skipping all cpudile tests...
+cpuidle is not supported. Skipping all cpuidle tests...
@@ -14,5 +14,5 @@ define $(module_name)_add_executable
include $(BUILD_PREBUILT)
endef
-test_num := 01 02 03 04 05 06
+test_num := sanity 01 02 03 04 05 06
$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, $(module_name)_$(item))))
@@ -28,7 +28,12 @@ source ../include/thermal_functions.sh
check_thermal_zone() {
- test -d $THERMAL_PATH && return 1 || return 0
+ test -d $THERMAL_PATH
+ if [ $? -ne 0 ]; then
+ echo "thermal zone is not available. Skipping all tests"
+ return 0
+ fi
+ return 1
}
check_thermal_zone
add a basic sanity file which will check for feature support and will proceed only if feature supported Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org> --- - sanity file will run first to check for feature support. - added entry for sanity file for android - this will need a change in the lava pm-qa trigger script for the tests, will make the change separately now. regards, sanjay --- cpufreq/Android.mk | 2 +- cpufreq/cpufreq_sanity.sh | 40 +++++++++++++++++++++++++++++++++ cpufreq/cpufreq_sanity.txt | 1 + cpuhotplug/Android.mk | 2 +- cpuhotplug/cpuhotplug_sanity.sh | 45 ++++++++++++++++++++++++++++++++++++++ cpuhotplug/cpuhotplug_sanity.txt | 1 + cpuidle/Android.mk | 2 +- cpuidle/cpuidle_sanity.sh | 8 +++++-- cpuidle/cpuidle_sanity.txt | 2 +- thermal/Android.mk | 2 +- thermal/thermal_sanity.sh | 7 +++++- 11 files changed, 104 insertions(+), 8 deletions(-) create mode 100755 cpufreq/cpufreq_sanity.sh create mode 100644 cpufreq/cpufreq_sanity.txt create mode 100755 cpuhotplug/cpuhotplug_sanity.sh create mode 100644 cpuhotplug/cpuhotplug_sanity.txt