Lisa Nguyen | adf9df9 | 2015-01-25 18:16:45 -0800 | [diff] [blame] | 1 | #!/bin/sh |
Sanjay Singh Rawat | 736aef6 | 2014-01-29 12:15:02 +0530 | [diff] [blame] | 2 | # |
| 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 Nguyen | adf9df9 | 2015-01-25 18:16:45 -0800 | [diff] [blame] | 26 | . ../include/functions.sh |
Sanjay Singh Rawat | 736aef6 | 2014-01-29 12:15:02 +0530 | [diff] [blame] | 27 | |
| 28 | is_root |
| 29 | if [ $? -ne 0 ]; then |
| 30 | log_skip "user is not root" |
| 31 | exit 0 |
| 32 | fi |
| 33 | |
| 34 | check_cpufreq_sysfs_entry() { |
| 35 | |
Lisa Nguyen | 4e0b59a | 2015-01-25 17:46:40 -0800 | [diff] [blame] | 36 | dirpath=$CPU_PATH/cpufreq |
Sanjay Singh Rawat | 736aef6 | 2014-01-29 12:15:02 +0530 | [diff] [blame] | 37 | |
| 38 | test -d $dirpath |
| 39 | if [ $? -ne 0 ]; then |
| 40 | echo "cpufreq is not supported. Skipping all cpufreq tests" |
Lisa Nguyen | d713d63 | 2014-08-20 17:26:04 -0700 | [diff] [blame] | 41 | skip_tests cpufreq |
Sanjay Singh Rawat | 736aef6 | 2014-01-29 12:15:02 +0530 | [diff] [blame] | 42 | return 0 |
| 43 | fi |
| 44 | return 1 |
| 45 | } |
| 46 | |
| 47 | check_cpufreq_sysfs_entry |