--- /dev/null
+<testcase>
+ <summary>test use-build-count feature</summary>
+ <fixtures>
+ <copy src="tools/create_proj" />
+ <copy src="specs/sw-tools.spec" />
+ <copy src="conf/base.cfg" />
+ <copy src="conf/tizen.conf" />
+ </fixtures>
+ <steps><![CDATA[
+sudo /bin/rm -rf ~/GBS-ROOT/local/repos
+
+sudo /bin/rm -rf ~/GBS-ROOT/local/sources
+
+./create_proj sw-tools.spec
+
+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*.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"`"
+
+]]></steps>
+</testcase>
--- /dev/null
+<testcase>
+ <summary>test the depended package whether be re-installed</summary>
+ <fixtures>
+ <copy src="tools/create_proj" />
+ <copy src="specs/fake.spec" />
+ <copy src="specs/fake-dev.spec" />
+ <copy src="conf/base.cfg" />
+ <copy src="conf/tizen.conf" />
+ </fixtures>
+ <steps><![CDATA[
+sudo /bin/rm -rf ~/GBS-ROOT/local/repos
+
+sudo /bin/rm -rf ~/GBS-ROOT/local/sources
+
+./create_proj fake.spec
+
+./create_proj fake-dev.spec
+
+sed -i "/^Source/a BuildRequires: fake" fake-dev/packaging/fake-dev.spec
+
+cd fake-dev && git commit -am 'depend on fake' && cd ..
+
+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_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`"
+
+]]></steps>
+</testcase>