diff mbox

[Cbuildv2/get_source,10/17] testsuite/test.sh: Add test for tag matching an svn repo in sources.conf.

Message ID 1382129579-5777-11-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 | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
diff mbox

Patch

diff --git a/testsuite/test.sh b/testsuite/test.sh
index 7013830..9121f92 100755
--- a/testsuite/test.sh
+++ b/testsuite/test.sh
@@ -354,6 +354,16 @@  else
     fixme "get_source returned ${out}"
 fi
 
+in="newlib.git@e9a210b"
+out="`get_source ${in}`"
+if test x"${out}" = x"git://git.linaro.org/toolchain/newlib.git e9a210b"; then
+    pass "get_source: git repository with commit"
+else
+    fail "get_source: git repository with commit"
+    fixme "get_source returned ${out}"
+    fixme "should return git://git.linaro.org/toolchain/newlib.git e9a210b"
+fi
+
 in="gcc-linaro-4.8-2013.05.tar.bz2"
 out="`get_source ${in}`"
 if test x"${out}" = x"gcc-linaro-4.8-2013.05.tar.bz2"; then
@@ -372,6 +382,60 @@  else
     fixme "get_source returned ${out}"
 fi
 
+in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch"
+out="`get_source ${in}`"
+if test x"${out}" = x"svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch"; then
+    pass "get_source: Non-git direct url"
+else
+    fail "get_source: Non-git direct url"
+    fixme "get_source returned ${out}"
+fi
+
+in="git://git.linaro.org/toolchain/eglibc"
+out="`get_source ${in}`"
+if test x"${out}" = x"git://git.linaro.org/toolchain/eglibc"; then
+    pass "get_source: git direct url not ending in .git"
+else
+    fail "get_source: git direct url not ending in .git"
+    fixme "get_source returned ${out}"
+fi
+
+in="git://git.linaro.org/toolchain/eglibc/branchname@revision"
+out="`get_source ${in}`"
+if test x"${out}" = x"git://git.linaro.org/toolchain/eglibc/branchname@revision"; then
+    pass "get_source: git direct url not ending in .git with revision returns bogus url."
+else
+    fail "get_source: git direct url not ending in .git with revision returns bogus url."
+    fixme "get_source returned ${out}"
+fi
+
+in="git://git.linaro.org/toolchain/foo.git"
+out="`get_source ${in}`"
+if test x"${out}" = x""; then
+    pass "get_source: full url with <repo>.git with no matching source.conf entry should fail."
+else
+    fail "get_source: full url with <repo>.git with no matching source.conf entry should fail."
+    fixme "get_source returned ${out}"
+fi
+
+in="foo.git"
+out="`get_source ${in}`"
+if test x"${out}" = x""; then
+    pass "get_source: <repo>.git identifier with no matching source.conf entry should fail."
+else
+    fail "get_source: <repo>.git identifier with no matching source.conf entry should fail."
+    fixme "get_source returned ${out}"
+fi
+
+in="gcc-4.6"
+out="`get_source ${in} 2>/dev/null`"
+if test x"${out}" = x"svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch"; then
+    pass "get_source: tag matching an svn repo in sources.conf"
+else
+    fail "get_source: tag matching an svn repo in sources.conf"
+    fixme "get_source returned ${out}"
+fi
+
 # ----------------------------------------------------------------------------------
 
 echo "========= create_release_tag() tests ============"