diff options
author | Renato Botelho <renato@netgate.com> | 2017-02-23 06:28:41 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-23 06:28:41 -0300 |
commit | 82ceeb2ea625cd9bff60f2863b9a0830f55b7905 (patch) | |
tree | 263ca9347bf664a4489743f9302e699ce14de1df /contrib/netbsd-tests/dev/sysmon/t_swsensor.sh | |
parent | 4a05f5440acda223e6a0ec5157bc32ecc0f09ff9 (diff) | |
parent | d20dd8b36e7a565be7bfbb22aade51c8ffd753e9 (diff) | |
download | FreeBSD-src-devel.zip FreeBSD-src-devel.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into develdevel
Diffstat (limited to 'contrib/netbsd-tests/dev/sysmon/t_swsensor.sh')
-rwxr-xr-x | contrib/netbsd-tests/dev/sysmon/t_swsensor.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh b/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh index 5b54431..7f98c1a 100755 --- a/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh +++ b/contrib/netbsd-tests/dev/sysmon/t_swsensor.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_swsensor.sh,v 1.7 2013/04/14 16:07:46 martin Exp $ +# $NetBSD: t_swsensor.sh,v 1.9 2015/04/23 23:23:28 pgoyette Exp $ get_sensor_info() { rump.envstat -x | \ @@ -6,7 +6,13 @@ get_sensor_info() { } get_sensor_key() { - get_sensor_info | grep -A1 $1 | grep integer | sed -e 's;<[/a-z]*>;;g' + local v + v=$(get_sensor_info | grep -A1 $1 | grep integer | \ + sed -e 's;<[/a-z]*>;;g') + if [ -z "$v" ] ; then + v="key_$1_not_found" + fi + echo $v } get_powerd_event_count() { @@ -60,7 +66,7 @@ start_rump() { common_head() { atf_set descr "$1" - atf_set timeout 60 + atf_set timeout 120 atf_set require.progs rump.powerd rump.envstat rump.modload \ rump.halt rump.sysctl rump_server \ sed grep awk \ |