diff mbox

[Cbuildv2/get_source,13/17] testsuite/test.sh: Add tests for user git repos not ending in .git.

Message ID 1382129579-5777-14-git-send-email-ryan.arnold@linaro.org
State New
Headers show

Commit Message

Ryan S. Arnold Oct. 18, 2013, 8:52 p.m. UTC
From: "Ryan S. Arnold" <ryan.arnold@linaro.org>

---
 testsuite/test.sh           | 36 ++++++++++++++++++++++++++++++++++++
 testsuite/test_sources.conf |  3 +++
 2 files changed, 39 insertions(+)
diff mbox

Patch

diff --git a/testsuite/test.sh b/testsuite/test.sh
index f8189e7..db827c2 100755
--- a/testsuite/test.sh
+++ b/testsuite/test.sh
@@ -442,6 +442,42 @@  else
     fixme "get_source returned ${out}"
 fi
 
+in="bitbake.git"
+out="`get_source ${in} 2>/dev/null`"
+if test x"${out}" = x"git://git.openembedded.org/bitbake"; then
+    pass "get_source: ${sources_conf}:${in} matching non .git suffixed repo."
+else
+    fail "get_source: ${sources_conf}:${in} matching non .git suffixed repo."
+    fixme "get_source returned ${out}"
+fi
+
+in="foo.git"
+out="`get_source ${in} 2>/dev/null`"
+if test x"${out}" = x"git://testingrepository/foo"; then
+    pass "get_source: ${sources_conf}:${in} matching non .git suffixed repo."
+else
+    fail "get_source: ${sources_conf}:${in} matching non .git suffixed repo."
+    fixme "get_source returned ${out}"
+fi
+
+in="foo.git/bar"
+out="`get_source ${in} 2>/dev/null`"
+if test x"${out}" = x"git://testingrepository/foo bar"; then
+    pass "get_source: ${sources_conf}:${in} matching non .git suffixed repo with branch."
+else
+    fail "get_source: ${sources_conf}:${in} matching non .git suffixed repo with branch."
+    fixme "get_source returned ${out}"
+fi
+
+in="foo.git/bar@rev"
+out="`get_source ${in} 2>/dev/null`"
+if test x"${out}" = x"git://testingrepository/foo bar rev"; then
+    pass "get_source: ${sources_conf}:${in} matching non .git suffixed repo with branch and revision."
+else
+    fail "get_source: ${sources_conf}:${in} matching non .git suffixed repo with branch and revision."
+    fixme "get_source returned ${out}"
+fi
+
 # ----------------------------------------------------------------------------------
 
 echo "========= create_release_tag() tests ============"
diff --git a/testsuite/test_sources.conf b/testsuite/test_sources.conf
index 109921b..cf3bcf7 100644
--- a/testsuite/test_sources.conf
+++ b/testsuite/test_sources.conf
@@ -45,3 +45,6 @@  openembedded-core.git git://git.openembedded.org/openembedded-core
 valgrind        svn://svn.valgrind.org/valgrind/trunk
 qemu.git        git://git.qemu.org/qemu.git
 qemu-linaro.git git://git.linaro.org/qemu/qemu-linaro.git
+
+# For Testing Only
+foo.git   git://testingrepository/foo