git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/4] remote-helpers: trivial test fixes

From
Torsten Bögershausen <tboegi@web.de>
Date
Apr 6, 2013, 17:03 UTC
Message-ID
<51605546.3080503@web.de>
In-Reply-To
<1365089779-9726-1-git-send-email-felipe.contreras@gmail.com>
On 04.04.13 17:36, Felipe Contreras wrote:
Show 16 quoted lines
> Hi,
> 
> A reroll, now we do some checks, just avoid test-lint-duplicates, and fix the
> outsanding shell portability issue. The rest is the same.
> 
> Felipe Contreras (4):
>   remote-bzr: avoid echo -n
>   remote-helpers: fix the run of all tests
>   remote-bzr: remove stale check code for tests
>   remote-hg: fix hg-git test-case
> 
>  contrib/remote-helpers/Makefile          |  1 +
>  contrib/remote-helpers/test-bzr.sh       | 16 +---------------
>  contrib/remote-helpers/test-hg-hg-git.sh |  1 -
>  3 files changed, 2 insertions(+), 16 deletions(-)
> 
Sorry being late, now I installed bzr and hg on one of my machines 

One defect found: "\s" is not portable on all grep versions A "*" is not a "basic regular expression", so we need to use egrep

diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh
index 5f81dfa..2e80c11 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -115,7 +115,7 @@ test_expect_success 'update bookmark' '
   git push
   ) &&
 
-  hg -R hgrepo bookmarks | grep "devel\s\+3:"
+  hg -R hgrepo bookmarks | egrep "devel[[:space:]]+3:"
 '
2 mninor nits:

diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
index 8450432..7970f9e 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -13,7 +13,7 @@ if ! test_have_prereq PYTHON; then
 fi
 
 if ! "$PYTHON_PATH" -c 'import bzrlib'; then
-       skip_all='skipping remote-bzr tests; bzr not available'
+       skip_all='skipping remote-bzr tests; python bzrlib not available'
        test_done
 fi
 
diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh
index 3f253b7..5d87282 100755
--- a/contrib/remote-helpers/test-hg-hg-git.sh
+++ b/contrib/remote-helpers/test-hg-hg-git.sh
@@ -21,7 +21,7 @@ if ! "$PYTHON_PATH" -c 'import mercurial'; then
 fi
 
 if ! "$PYTHON_PATH" -c 'import hggit'; then
-       skip_all='skipping remote-hg tests; hg-git not available'
+       skip_all='skipping remote-hg tests; python hggit not available'
        test_done
 fi

(And as a micro-nit: the indenting deserves some better indentation:
TAB could be used for *.sh, and sub-shells could be indentented one TAB:


test_expect_success 'update bookmark' '
	test_when_finished "rm -rf gitrepo*" &&
	(
		cd hgrepo &&
		hg bookmark devel

/Torsten
Previous: Felipe ContrerasNext: Torsten Bögershausen
Message 6 of 11 in “remote-helpers: trivial test fixes”
  1. 0/4 remote-helpers: trivial test fixesFelipe Contreras, Apr 4, 2013
  2. 1/4 remote-bzr: avoid echo -nFelipe Contreras, Apr 4, 2013
  3. 2/4 remote-helpers: fix the run of all testsFelipe Contreras, Apr 4, 2013
  4. 3/4 remote-bzr: remove stale check code for testsFelipe Contreras, Apr 4, 2013
  5. 4/4 remote-hg: fix hg-git test-caseFelipe Contreras, Apr 4, 2013
  6. Torsten BögershausenApr 6, 2013
  7. Torsten BögershausenApr 6, 2013
  8. Felipe ContrerasApr 6, 2013
  9. Torsten BögershausenApr 6, 2013
  10. Felipe ContrerasApr 6, 2013
  11. Torsten BögershausenApr 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.