Add macros case which use macro defined in build.conf
authory0169.zhang <y0169.zhang@samsung.com>
Fri, 8 Dec 2017 05:11:14 +0000 (13:11 +0800)
committery0169.zhang <y0169.zhang@samsung.com>
Fri, 8 Dec 2017 05:11:24 +0000 (13:11 +0800)
Change-Id: Ifff176581153559de60e9f254ff66ac8defc7f0d

cases/build/test_build_macros.case [new file with mode: 0644]

diff --git a/cases/build/test_build_macros.case b/cases/build/test_build_macros.case
new file mode 100644 (file)
index 0000000..31f40f5
--- /dev/null
@@ -0,0 +1,31 @@
+<testcase>
+  <summary>test build use macros which defined in build.conf</summary>
+  <tracking>
+    <ticket>91</ticket>
+  </tracking>
+  <fixtures>
+    <copy src="tools/create_proj" />
+    <copy src="tools/assert" />
+    <copy src="specs/fake.spec" />
+    <copy src="conf/base.cfg" />
+    <copy src="conf/tizen.conf" />
+  </fixtures>
+  <steps><![CDATA[
+. assert
+
+#sudo /bin/rm -rf ~/GBS-ROOT/local/BUILD-ROOTS/scratch.i586.0
+#sudo /bin/rm -rf $GBS_LOCAL_REPOS
+
+sed -i 's/Version:    1.0/Version: 1%{?dist}/g' fake.spec
+./create_proj fake.spec
+echo "
+Macros:
+%dist tizen
+:Macros" >> tizen.conf
+
+gbs -c base.cfg build -A i586 -D tizen.conf |tee log
+
+test -n "`find ~/GBS-ROOT/local/repos -name "fake*.rpm"`"
+
+]]></steps>
+</testcase>