aboutsummaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorRyan S. Arnold <ryan.arnold@linaro.org>2014-02-03 18:33:40 -0600
committerRyan S. Arnold <ryan.arnold@linaro.org>2014-02-03 18:33:40 -0600
commitf595c373011d11d8803d736b5eddddbb58db38b6 (patch)
tree20c76eb13ebe5ea9f43092f52c031d1346ce9aa9 /test.sh
parent9efe35844a0ccc54b34ffb0dc9f56f3d571da83e (diff)
cbuild2.sh: Add --stage {1|2} for building gcc standalone.
Also add toplevel test.sh testcases for --stage. Change-Id: Ifceba26ae104835a563b8ad11b5e49e744d99e72
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh36
1 files changed, 26 insertions, 10 deletions
diff --git a/test.sh b/test.sh
index a25b3eb..66746b2 100755
--- a/test.sh
+++ b/test.sh
@@ -339,13 +339,29 @@ test_failure "${cb_commands}" "${match}"
# for baremetal.
cb_commands="--dryrun glibc=glibc.git --target aarch64-none-elf"
match='crosscheck_clibrary_target'
-test_pass "${cb_commands}" "${match}"
-
+test_failure "${cb_commands}" "${match}"
cb_commands="--snapshots"
match='requires a directive'
test_failure "${cb_commands}" "${match}"
+cb_commands="--stage"
+match='requires a directive'
+test_failure "${cb_commands}" "${match}"
+
+cb_commands="--stage a"
+match='stage requires a 2 or 1 directive'
+test_failure "${cb_commands}" "${match}"
+
+cb_commands="--stage 3"
+match='stage requires a 2 or 1 directive'
+test_failure "${cb_commands}" "${match}"
+
+cb_commands="--stage 3"
+match='stage requires a 2 or 1 directive'
+test_failure "${cb_commands}" "${match}"
+
+
cb_commands="--snapshots --sooboo"
match='found the next'
test_failure "${cb_commands}" "${match}"
@@ -479,14 +495,14 @@ test_pass "${cb_commands}" "${match}"
# This one's a bit different because it doesn't work by putting the phrase to
# be grepped in 'match'... yet.
-#cb_commands="--dryrun --build gcc.git --stage 2"
-#testlineno="`expr $LINENO + 1`"
-#out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep -c " build.*gcc.*stage2")`"
-#if test ${out} -gt 0; then
-# pass ${testlineno} "VALID: --dryrun --build gcc.git --stage 2"
-#else
-# fail ${testlineno} "VALID: --dryrun --build gcc.git --stage 2"
-#fi
+cb_commands="--dryrun --build gcc.git --stage 2"
+testlineno="`expr $LINENO + 1`"
+out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep -c " build.*gcc.*stage2")`"
+if test ${out} -gt 0; then
+ pass ${testlineno} "VALID: --dryrun --build gcc.git --stage 2"
+else
+ fail ${testlineno} "VALID: --dryrun --build gcc.git --stage 2"
+fi
# If the tests pass successfully clean up /tmp/<tmpdir> but only if the
# directory name is conformant. We don't want to accidentally remove /tmp.