From: wanchao-xu Date: Fri, 21 Jun 2024 07:43:14 +0000 (+0800) Subject: Add test cases of '--use-build-count' option. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fsandbox%2Fxuwc%2Friscv_test;p=tools%2Fitest-cases-gbs.git Add test cases of '--use-build-count' option. Change-Id: I2300688e346aab11544fcb937bf0fea8ac08f380 Signed-off-by: wanchao-xu --- diff --git a/cases/build/test_build_use_build_count.case b/cases/build/test_build_use_build_count.case new file mode 100755 index 0000000..949f21c --- /dev/null +++ b/cases/build/test_build_use_build_count.case @@ -0,0 +1,33 @@ + + test use-build-count feature + + + + + + + &1 | tee log + +test -n "`grep "I have the following modifications for sw-tools.spec:" log`" + +test -n "`find ~/GBS-ROOT/local/repos -name "*sw-tools*.1.armv7l.rpm"`" + +test -n "`find ~/GBS-ROOT/local/sources -name "*sw-tools*.bcnt"`" + +gbs -c base.cfg build sw-tools -A armv7l -D tizen.conf --use-build-count 2>&1 | tee log + +test -n "`grep "I have the following modifications for sw-tools.spec:" log`" + +test -n "`find ~/GBS-ROOT/local/repos -name "*sw-tools*.2.armv7l.rpm"`" + +test -n "`find ~/GBS-ROOT/local/sources -name "*sw-tools*.bcnt"`" + +]]> + diff --git a/cases/build/test_build_use_build_count_reinstall.case b/cases/build/test_build_use_build_count_reinstall.case new file mode 100755 index 0000000..6367583 --- /dev/null +++ b/cases/build/test_build_use_build_count_reinstall.case @@ -0,0 +1,56 @@ + + test the depended package whether be re-installed + + + + + + + + &1 | tee log + +test -n "`grep "I have the following modifications for fake.spec:" log`" + +bcnt_file="`find ~/GBS-ROOT/local/sources -name "*fake*.bcnt"`" + +test -n "$bcnt_file" + +test "`cat $bcnt_file | tr -d "\n"`" == "1" + +gbs -c base.cfg build fake-dev -A i586 -D tizen.conf 2>&1 | tee log + +test -n "`find ~/GBS-ROOT/local/repos -name "*fake-dev*.rpm"`" + +test -n "`grep "cumulate fake-1.0-1.1" log`" + +gbs -c base.cfg build fake -A i586 -D tizen.conf --use-build-count 2>&1 | tee log + +test -n "`grep "I have the following modifications for fake.spec:" log`" + +bcnt_file2="`find ~/GBS-ROOT/local/sources -name "*fake*.bcnt"`" + +test -n "$bcnt_file2" + +test "`cat $bcnt_file2 | tr -d "\n"`" == "2" + +gbs -c base.cfg build fake-dev -A i586 -D tizen.conf --overwrite 2>&1 | tee log + +test -n "`find ~/GBS-ROOT/local/repos -name "*fake-dev*.rpm"`" + +test -n "`grep "cumulate fake-1.0-1.2" log`" + +]]> +