diff options
author | Bernard Ogden <bernie.ogden@linaro.org> | 2014-08-01 14:12:11 +0100 |
---|---|---|
committer | Bernard Ogden <bernie.ogden@linaro.org> | 2014-08-08 12:22:40 +0100 |
commit | e9c75e0d98148d88ff6459b6a2041222be6841af (patch) | |
tree | d33829ac9eccb9089d395a5544be156396f2c88d /testsuite/normalize-tests.sh | |
parent | 8ff56efc81f01cfac8bfea7d9d252ce8ed1a7f53 (diff) |
Support git-over-ssh
Already submitted via bugzilla, but some later patches depend on
it, so included here for convenience.
Think I found all the right places to make updates in the source.
Dealt with testing mainly by looking for tests on git:// urls and
creating ssh:// versions of those tests. In many cases, did this
by introducing for loops that iterate over ssh, git, http for these
tests. Not sure that I've covered all the cases.
Updates to push() and commit() are untested as these functions
seem never to be called.
Change-Id: Ib216117f689615b4b7db8877f9cc54c4533c4021
Diffstat (limited to 'testsuite/normalize-tests.sh')
-rw-r--r-- | testsuite/normalize-tests.sh | 95 |
1 files changed, 49 insertions, 46 deletions
diff --git a/testsuite/normalize-tests.sh b/testsuite/normalize-tests.sh index 22167a1a..e15fba12 100644 --- a/testsuite/normalize-tests.sh +++ b/testsuite/normalize-tests.sh @@ -11,42 +11,44 @@ else fixme "${in} returned ${out}" fi -in="git://git.linaro.org/toolchain/binutils.git" -out="`normalize_path ${in}`" -if test x"${out}" = x"binutils.git"; then - pass "normalize_path: git repository" -else - fail "normalize_path: git repository" - fixme "${in} returned ${out}" -fi - -out="`normalize_path binutils.git/binutils-2_18-branch`" -match="binutils.git~binutils-2_18-branch" -if test x"${out}" = x"${match}"; then - pass "normalize_path: git repository with branch" -else - fail "normalize_path: git repository with branch" - fixme "${in} returned ${out}" -fi - -testing="normalize_path: git repository with ~ branch and commit" -out="`normalize_path ${in}~binutils-2_18-branch@123456`" -if test x"${out}" = x"binutils.git~binutils-2_18-branch@123456"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - -testing="normalize_path: git repository with ~ and multi-/ branch and commit" -out="`normalize_path ${in}~binutils-2_18-branch/foo/bar@123456`" -match="binutils.git~binutils-2_18-branch-foo-bar@123456" -if test x"${out}" = x"${match}"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi +for transport in git ssh http; do + in="${transport}://git.linaro.org/toolchain/binutils.git" + out="`normalize_path ${in}`" + if test x"${out}" = x"binutils.git"; then + pass "normalize_path: git repository (${transport})" + else + fail "normalize_path: git repository (${transport})" + fixme "${in} returned ${out}" + fi + + out="`normalize_path binutils.git/binutils-2_18-branch`" + match="binutils.git~binutils-2_18-branch" + if test x"${out}" = x"${match}"; then + pass "normalize_path: git repository with branch (${transport})" + else + fail "normalize_path: git repository with branch (${transport})" + fixme "${in} returned ${out}" + fi + + testing="normalize_path: git repository with ~ branch and commit (${transport})" + out="`normalize_path ${in}~binutils-2_18-branch@123456`" + if test x"${out}" = x"binutils.git~binutils-2_18-branch@123456"; then + pass "${testing}" + else + fail "${testing}" + fixme "${in} returned ${out}" + fi + + testing="normalize_path: git repository with ~ and multi-/ branch and commit (${transport})" + out="`normalize_path ${in}~binutils-2_18-branch/foo/bar@123456`" + match="binutils.git~binutils-2_18-branch-foo-bar@123456" + if test x"${out}" = x"${match}"; then + pass "${testing}" + else + fail "${testing}" + fixme "${in} returned ${out}" + fi +done testing="normalize_path: git repository with ~ branch" in="gcc.git/linaro-4.8-branch" @@ -58,16 +60,17 @@ else fixme "${in} returned ${out}" fi -testing="normalize_path: full git url with ~ branch" -in="http://staging.git.linaro.org/git/toolchain/gcc.git/linaro-4.8-branch" -out="`normalize_path ${in}`" -if test x"${out}" = x"gcc.git~linaro-4.8-branch"; then - pass "${testing}" -else - fail "${testing}" - fixme "${in} returned ${out}" -fi - +for transport in git ssh http; do + testing="normalize_path: full git (${transport}) url with ~ branch" + in="${transport}://staging.git.linaro.org/git/toolchain/gcc.git/linaro-4.8-branch" + out="`normalize_path ${in}`" + if test x"${out}" = x"gcc.git~linaro-4.8-branch"; then + pass "${testing}" + else + fail "${testing}" + fixme "${in} returned ${out}" + fi +done in="gdb-7.6~20121001+git3e2e76a.tar" out="`normalize_path ${in}`" |