start:rmkitcomp_v
os:Linux
cmd:rmkitcomp -v
check:rc==0
check:output=~rmkitcomp
check:output=~kitframework
check:output=~compatible_frameworks
cmd:rmkitcomp --version
check:rc==0
check:output=~rmkitcomp
check:output=~kitframework
check:output=~compatible_frameworks
end

start:rmkitcomp_h
os:Linux
cmd:rmkitcomp -h
check:rc==0
check:output =~ Usage
cmd:rmkitcomp --help
check:rc==0
check:output=~ Usage
end

start:rmkitcomp_noscripts
os:Linux
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA
cmd:cp -rf /opt/xcat/share/xcat/tools/autotest/$$KITDATA /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA;buildkit buildrepo all
check:rc==0
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA;buildkit buildtar
check:rc==0
cmd:addkit /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA/*.tar.bz2
check:rc==0
check:output=~successfully added
cmd:mkdef testimage -u profile=compute provmethod=install osarch=ppc64el
check:rc==0
cmd:addkitcomp -i testimage -a ubuntukit-compute-2
check:rc==0
check:output=~Assigning kit component ubuntukit-compute-2
cmd:lsdef -t osimage -o testimage
check:rc==0
check:output=~postbootscripts
cmd:rmkitcomp -i testimage -f ubuntukit-compute-2-1.0-1-ubuntu-14.04-ppc64el --noscripts
check:rc==0
check:output=~Removing kitcomponent ubuntukit-compute-2-1.0-1-ubuntu-14.04-ppc64el from osimage testimage
cmd:lsdef -t osimage -o testimage
check:rc==0
check:output=~postbootscripts
cmd:rmkitcomp -i testimage -f ubuntukit-compute-1-1.0-1-ubuntu-14.04-ppc64el
check:rc==0
cmd:rmkit ubuntukit-1.0-1-ppc64el
check:rc==0
cmd:rm -f /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA/ubuntukit-1.0-1-ppc64el.tar.bz2
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA
cmd:rmdef -t osimage -o testimage
check:rc==0
end

start:rmkitcomp_f
os:Linux
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA
cmd:cp -rf /opt/xcat/share/xcat/tools/autotest/$$KITDATA /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA;buildkit buildrepo all
check:rc==0
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA;buildkit buildtar
check:rc==0
cmd:addkit /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA/*.tar.bz2
check:rc==0
check:output=~successfully added
cmd:mkdef testimage -u profile=compute provmethod=install osarch=ppc64el
check:rc==0
cmd:addkitcomp -i testimage -a ubuntukit-compute-2
check:rc==0
check:output=~Assigning kit component ubuntukit-compute-2
cmd:lsdef -t osimage -o testimage |grep -i kitcomponents
check:rc==0
check:output=~ubuntukit-compute-1
check:output=~ubuntukit-compute-2
cmd:rmkitcomp -i testimage ubuntukit-compute-1-1.0-1-ubuntu-14.04-ppc64el
check:rc==1
check:output=~Error: (\[.*?\]: )?Failed to remove kitcomponent
cmd:rmkitcomp -i testimage -f ubuntukit-compute-1-1.0-1-ubuntu-14.04-ppc64el
check:rc==0
check:output=~Removing kitcomponent ubuntukit-compute-1-1.0-1-ubuntu-14.04-ppc64el from osimage testimage
cmd:rmkitcomp -i testimage -f ubuntukit-compute-2-1.0-1-ubuntu-14.04-ppc64el
check:rc==0
check:output=~Removing kitcomponent ubuntukit-compute-2-1.0-1-ubuntu-14.04-ppc64el from osimage testimage
cmd:rmkit ubuntukit-1.0-1-ppc64el
check:rc==0
cmd:rm -f /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA/ubuntukit-1.0-1-ppc64el.tar.bz2
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA
cmd:rmdef -t osimage -o testimage
check:rc==0
end

