Sanjay Singh Rawat | 2f7295d | 2013-08-21 18:19:42 +0530 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # PM-QA validation test suite for the power management on Linux |
| 4 | # |
| 5 | # Copyright (C) 2013, 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> (LG Electronics) |
| 23 | # - initial API and implementation |
| 24 | # |
| 25 | |
| 26 | # URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/QA/Scripts#thermal_00 |
| 27 | |
| 28 | source ../include/functions.sh |
| 29 | source ../include/thermal_functions.sh |
| 30 | |
| 31 | check_cooling_device_type() { |
| 32 | local all_zones=$(ls $THERMAL_PATH | grep "cooling_device['$MAX_CDEV']") |
| 33 | echo "Cooling Device list:" |
| 34 | for i in $all_zones; do |
| 35 | local type=$(cat $THERMAL_PATH/$i/type) |
| 36 | echo "- $type" |
| 37 | done |
| 38 | } |
| 39 | |
| 40 | check_thermal_zone_type() { |
| 41 | local all_zones=$(ls $THERMAL_PATH | grep "thermal_zone['$MAX_ZONE']") |
| 42 | echo "Thermal Zone list:" |
| 43 | for i in $all_zones; do |
| 44 | local type=$(cat $THERMAL_PATH/$i/type) |
| 45 | echo "- $type" |
| 46 | done |
| 47 | } |
| 48 | |
| 49 | for_each_thermal_zone check_thermal_zone_type |
| 50 | for_each_thermal_zone check_cooling_device_type |