2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

add rbeacon test cases

This commit is contained in:
litingt@cn.ibm.com 2018-04-10 04:20:47 -04:00
parent 3857b0492a
commit dc483c80cf

View File

@ -0,0 +1,59 @@
start:rbeacon_null
description: this case is to test rbeacon usage
cmd:rbeacon
check:rc==0
check:output=~Usage
end
start:rbeacon_stat
description: this case is to test rbeacon CN stat
cmd:rbeacon $$CN stat
check:rc==0
check:output=~$$CN\s*:\s*Front:Off Rear:Off|Front:On Rear:On|Front:Off Rear:On|Front:On Rear:Off
end
start:rbeacon_on_off
description: this case is to test rbeacon CN on/off
cmd:rbeacon $$CN stat |tee /tmp/rbeaconstat
check:rc==0
cmd:if grep "Front:Off Rear:Off" /tmp/rbeaconstat;then rbeacon $$CN on; fi
check:rc==0
check:output=~$$CN\s*:\s*on
cmd:rbeacon $$CN stat
check:output=~$$CN\s*:\s*Front:Blink Rear:Blink
cmd:if grep "Front:Off Rear:Off" /tmp/rbeaconstat;then rbeacon $$CN off; fi
check:rc==0
check:output=~$$CN\s*:\s*off
end
start:rbeacon_help
description: this case is to test rbeacon -h and --help output
cmd:rbeacon -h
check:rc==0
check:output=~Usage
check:output =~OpenPOWER \(OpenBMC\) specific:
cmd:rbeacon --help
check:rc==0
check:output=~Usage
check:output =~OpenPOWER \(OpenBMC\) specific:
end
start:rbeacon_version
description: this case is to test rbeacon -v and --version output
cmd:rbeacon -v
check:rc==0
check:output=~Version
check:output =~git commit
cmd:rbeacon --version
check:rc==0
check:output=~~Version
check:output =~git commit
end
start:rbeacon_false
description: this case is to test rbeacon could process false input
cmd:rbeacon $$CN abc
check:rc!=0
check:output=~$$CN\s*:\s*Error:\s*Only \'on\', \'off\' or \'stat\' is supported
end