add test cases for buildkit
This commit is contained in:
parent
59ca686eec
commit
5b5703e18b
293
xCAT-test/autotest/testcase/buildkit/cases0
Normal file
293
xCAT-test/autotest/testcase/buildkit/cases0
Normal file
@ -0,0 +1,293 @@
|
||||
start:buildkit_v
|
||||
os:Linux
|
||||
cmd:buildkit -v
|
||||
check:rc==0
|
||||
check:output=~xCAT-buildkit
|
||||
check:output=~kitframework
|
||||
check:output=~compatible_frameworks
|
||||
cmd:buildkit --version
|
||||
check:rc==0
|
||||
check:output=~xCAT-buildkit
|
||||
check:output=~kitframework
|
||||
check:output=~compatible_frameworks
|
||||
end
|
||||
|
||||
start:buildkit_h
|
||||
os:Linux
|
||||
cmd:buildkit -h
|
||||
check:rc==0
|
||||
check:output =~ Usage
|
||||
cmd:buildkit --help
|
||||
check:rc==0
|
||||
check:output=~ Usage
|
||||
end
|
||||
|
||||
start:buildkit_create
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits;buildkit create prodkit
|
||||
check:rc==0
|
||||
check:output=~Kit template for prodkit created in /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits/prodkit directory
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits/prodkit
|
||||
check:rc==0
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits/prodkit
|
||||
check:rc==0
|
||||
check:output=~buildkit.conf
|
||||
check:output=~source_packages
|
||||
check:output=~scripts
|
||||
check:output=~plugins
|
||||
check:output=~other_files
|
||||
check:output=~docs
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
end
|
||||
|
||||
start:buildkit_create_l
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/;buildkit create prodkit -l mykits/prodkit
|
||||
check:rc==0
|
||||
check:output=~Kit template for prodkit created in mykits/prodkit directory
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits/prodkit
|
||||
check:rc==0
|
||||
check:output=~buildkit.conf
|
||||
check:output=~source_packages
|
||||
check:output=~scripts
|
||||
check:output=~plugins
|
||||
check:output=~other_files
|
||||
check:output=~docs
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_all
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/build/kit_repodir
|
||||
check:output=~prodkit-1.0-1
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/build/kit_repodir/prodkit-1.0-1-*
|
||||
check:output=~repodata
|
||||
check:output=~pkg1-1-1.noarch.rpm
|
||||
check:output=~prep_prodkit_compute-1.0-1.noarch.rpm
|
||||
check:output=~prodkit_compute-1.0-1.noarch.rpm
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_buildrepo_rhels
|
||||
os:rhels
|
||||
arch:ppc64
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo rhels6.4
|
||||
check:rc==0
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/build/kit_repodir
|
||||
check:output=~prodkit-1.0-1
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/build/kit_repodir/prodkit-1.0-1-*
|
||||
check:output=~repodata
|
||||
check:output=~pkg1-1-1.noarch.rpm
|
||||
check:output=~prep_prodkit_compute-1.0-1.noarch.rpm
|
||||
check:output=~prodkit_compute-1.0-1.noarch.rpm
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleanrepo_all
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit cleanrepo all
|
||||
check:rc==0
|
||||
check:output=~successfully removed
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/build/
|
||||
check:output!~kit_repodir
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleanrepo_rhels
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit cleanrepo rhels6.4
|
||||
check:rc==0
|
||||
check:output=~Kit repository rhels6.4 has been removed
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/build/kit_repodir|grep rhels
|
||||
check:output!~rhels
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_cleanrepo_sles
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit cleanrepo sles11.2
|
||||
check:rc==0
|
||||
check:output=~Kit repository sles11.2 has been removed
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/build/kit_repodir|grep sles
|
||||
check:output!~sles
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
|
||||
start:buildkit_listrepo
|
||||
os:rhels
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit listrepo
|
||||
check:rc==0
|
||||
check:output=~rhels6.4: DONE
|
||||
check:output!~error
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
|
||||
start:buildkit_listrepo
|
||||
os:sles
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit listrepo
|
||||
check:rc==0
|
||||
check:output=~sles11.2: DONE
|
||||
check:output!~error
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
|
||||
start:buildkit_buildtar
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit listrepo
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildtar
|
||||
check:rc==0
|
||||
check:output=~prodkit-1.0-1.tar.bz2 successfully built
|
||||
check:output!~error
|
||||
cmd:ls /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/prodkit-1.0-1.tar.bz2
|
||||
check:rc==0
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
|
||||
start:buildkit_cleantar
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit cleantar
|
||||
check:rc==0
|
||||
check:output=~Kit tar files have been successfully removed from /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
check:output=~Removed /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/rpmbuild
|
||||
check:output!~error
|
||||
cmd: ls |grep prodkit-1.0-1.tar.bz2
|
||||
check:output!~prodkit-1.0-1.tar.bz2
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_chkconfig
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit chkconfig
|
||||
check:rc==0
|
||||
check:output=~No errors were found in Kit Build File /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf
|
||||
cmd:mv /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/other_files/sample/exclude.lst /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/other_files/sample/exclude.lst.new
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit chkconfig
|
||||
check:rc!=0
|
||||
check:output=~Exclude List file /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/other_files/sample/exclude.lst defined in Kit Componenet "prodkit_compute" does not exist or is not readable
|
||||
cmd:mv /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/other_files/sample/exclude.lst.new /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/other_files/sample/exclude.lst
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit chkconfig
|
||||
check:rc==0
|
||||
check:output=~~No errors were found in Kit Build File /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf
|
||||
cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
start:buildkit_partialkit
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cat /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf|sed 's/isexternalpkg=no/isexternalpkg=yes/g' > /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.new
|
||||
cmd:cat /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.new |sed '/rpm_prebuiltdir/d' > /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.tmp
|
||||
check:rc==0
|
||||
cmd:mv /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.tmp /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildtar
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;tar -tf prodkit-1.0-1.NEED_PRODUCT_PKGS.tar.bz2
|
||||
check:rc==0
|
||||
check:output=~prodkit-1.0-1/build_input/buildkit.conf
|
||||
check:output=~prodkit-1.0-1/kit.conf
|
||||
check:output=~prodkit-1.0-1/repos/
|
||||
check:output=~prodkit_compute-1.0-1.noarch.rpm
|
||||
check:output=~prep_prodkit_compute-1.0-1.noarch.rpm
|
||||
check:output!~pkg1-1-1.noarch.rpm
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
||||
|
||||
start:buildkit_partialkit_completekit
|
||||
os:Linux
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit
|
||||
check:rc==0
|
||||
cmd:cat /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf|sed 's/isexternalpkg=no/isexternalpkg=yes/g' > /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.new
|
||||
cmd:cat /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.new |sed '/rpm_prebuiltdir/d' > /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.tmp
|
||||
check:rc==0
|
||||
cmd:mv /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf.tmp /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/buildkit.conf
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildrepo all
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit buildtar
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;tar -tf prodkit-1.0-1.NEED_PRODUCT_PKGS.tar.bz2
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit addpkgs prodkit-1.0-1.NEED_PRODUCT_PKGS.tar.bz2 -p source_packages/sample/pkg1
|
||||
check:rc==0
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;tar -tf prodkit-1.0-1.tar.bz2
|
||||
check:rc==0
|
||||
check:output=~prodkit_compute-1.0-1.noarch.rpm
|
||||
check:output=~prep_prodkit_compute-1.0-1.noarch.rpm
|
||||
check:output=~pkg1-1-1.noarch.rpm
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;rm -f prodkit-1.0-1.tar.bz2
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;buildkit addpkgs prodkit-1.0-1.NEED_PRODUCT_PKGS.tar.bz2 -p source_packages/sample/pkg1 -k 2.0 -r s002a
|
||||
check:rc==0
|
||||
check:output=~/opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit/prodkit-2.0-s002a.tar.bz2 successfully built
|
||||
cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit;tar -tf prodkit-2.0-s002a.tar.bz2
|
||||
check:output=~prodkit_compute-2.0-s002a.noarch.rpm
|
||||
check:output=~prep_prodkit_compute-2.0-s002a.noarch.rpm
|
||||
check:output=~pkg1-1-1.noarch.rpm
|
||||
cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user