#comment out for developper will not fix it
#start:rinv_null
#cmd:rinv
#check:rc!=0
#check:output=~Usage
#end
start:rinv_h
description:show help information for rinv
cmd:rinv -h
check:rc==0
check:output=~Usage
check:output=~rinv
end
start:rinv_help
description:show help information for rinv
cmd:rinv --help
check:rc==0
check:output=~Usage
check:output=~rinv
end
start:rinv_v
description:show version for Version
cmd:rinv -v
check:rc==0
check:output=~Version
end

start:rinv_bus
description:rinv list all buses for each I/O slot 
Attribute: $$CN-The operation object of rinv command
cmd:rinv $$CN bus
check:rc==0
check:output=~I/O Bus Information
end
start:rinv_config
description:Retrieves number of processors, speed, total memory, and DIMM locations. 
Attribute: $$CN-The operation object of rinv command
cmd:rinv $$CN config
check:rc==0
check:output=~Machine Configuration Info
check:output=~Number of Processors:\s*\d+
check:output=~Total Memory \(\w+\):\s*\d+
end
start:rinv_serial
description:Retrieves serial number.
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN serial
check:rc==0
end
start:rinv_model
description:Retrieves serial number.
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN model
check:rc==0
end
start:rinv_firm
description:Retrieves firmware versions.
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN firm
check:rc==0
end
start:rinv_all
description:get serial,model
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN all
check:rc==0
end
start:rinv_cpu
description:get cpu information
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN cpu
check:rc==0
end
start:rinv_dimm
description:get dimm information
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN dimm
check:rc==0
end
start:rinv_uuid
description:get uuid information
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN uuid
check:rc==0
end
start:rinv_vpd
description:get vpd information
Attribute: $$CN-The operation object of rinv command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rvitals/openbmctest.sh rinv $$CN vpd
check:rc==0
end

start:rinv_noderange_err
cmd:rinv testnode
check:rc!=0
check:output=~Error
end
start:rinv_mixnode
description:get mixnode information,one is invalid node
Attribute: $$CN-The operation object of rinv command
cmd:test=$(lsdef testnode);if [[ $? -eq 0 ]]; then lsdef -l testnode -z >/tmp/testnode.stanza ;rmdef testnode;fi
check:rc==0
cmd:chdef testnode groups=test mgt=__GETNODEATTR($$CN,mgt)__
check:rc==0
cmd:chdef -p -t node  -o $$CN  groups="test"
check:rc==0
cmd:rinv test all
check:rc==1
check:output=~$$CN: SYSTEM|$$CN: System
cmd:chdef -m -t node -o $$CN groups="test"
check:rc==0
cmd:rmdef testnode;if [[ -e /tmp/testnode.stanza ]]; then cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza;fi
check:rc==0
end
start:rinv_wrongbmcpasswd
description:get right return if bmc's passwd wrong
Attribute: $$CN-The operation object of rinv command
cmd:lsdef -l $$CN -z >/tmp/testnode.stanza
check:rc==0
cmd:chdef $$CN bmcpassword=test
check:rc==0
cmd:rinv $$CN all
check:rc==1
check:output=~$$CN: Error:.+Invalid username or password|Error: ERROR: Incorrect password provided
cmd:cat /tmp/testnode.stanza | chdef -z;rm -rf /tmp/testnode.stanza 
check:rc==0
end
start:rinv_errorcommand
description:get right return if input error command
cmd:rinv $$CN dafds
check:rc==1
check:output=~Unsupported command|Error: Usage:
end
