blob: 6aba317d75db33049600d1c4ef5b4ef429d1c01c [file] [log] [blame]
Lisa Nguyenadf9df92015-01-25 18:16:45 -08001#!/bin/sh
Sanjay Singh Rawat736aef62014-01-29 12:15:02 +05302#
3# PM-QA validation test suite for the power management on Linux
4#
5# Copyright (C) 2014, Linaro Limited.
6#
7# This program is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public License
9# as published by the Free Software Foundation; either version 2
10# of the License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20#
21# Contributors:
22# Sanjay Singh Rawat <sanjay.rawat@linaro.org>
23# - initial API and implementation
24#
25
Lisa Nguyenadf9df92015-01-25 18:16:45 -080026. ../include/functions.sh
Sanjay Singh Rawat736aef62014-01-29 12:15:02 +053027
28is_root
29if [ $? -ne 0 ]; then
30 log_skip "user is not root"
31 exit 0
32fi
33
34check_cpufreq_sysfs_entry() {
35
Lisa Nguyen4e0b59a2015-01-25 17:46:40 -080036 dirpath=$CPU_PATH/cpufreq
Sanjay Singh Rawat736aef62014-01-29 12:15:02 +053037
38 test -d $dirpath
39 if [ $? -ne 0 ]; then
40 echo "cpufreq is not supported. Skipping all cpufreq tests"
Lisa Nguyend713d632014-08-20 17:26:04 -070041 skip_tests cpufreq
Sanjay Singh Rawat736aef62014-01-29 12:15:02 +053042 return 0
43 fi
44 return 1
45}
46
47check_cpufreq_sysfs_entry