From afeb525980e2a7d2f01e4611f61080fbeac18411 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 4 Apr 2013 09:36:16 -0600 Subject: [PATCH 1/4] remote-bzr: avoid echo -n It's not portable, as reported by test-lint. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/test-bzr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index 70aa8a010..b81052b61 100755 --- a/contrib/remote-helpers/test-bzr.sh +++ b/contrib/remote-helpers/test-bzr.sh @@ -136,7 +136,7 @@ test_expect_success 'special modes' ' (cd gitrepo && git cat-file -p HEAD:link > ../actual) && - echo -n content > expected && + printf content > expected && test_cmp expected actual ' From e4f0e34c8968183119e5028ed77f3e3a6079e3cb Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 4 Apr 2013 09:36:17 -0600 Subject: [PATCH 2/4] remote-helpers: fix the run of all tests We don't need to check for duplicate test numbers, we don't have them, and either way test-lint-duplicates doesn't work in this situation. Also, while we are on it, enable test-lint-shell-syntax to check for sh errors. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile index 9a76575f7..239161de3 100644 --- a/contrib/remote-helpers/Makefile +++ b/contrib/remote-helpers/Makefile @@ -3,6 +3,7 @@ TESTS := $(wildcard test*.sh) export T := $(addprefix $(CURDIR)/,$(TESTS)) export MAKE := $(MAKE) -e export PATH := $(CURDIR):$(PATH) +export TEST_LINT := test-lint-executable test-lint-shell-syntax test: $(MAKE) -C ../../t $@ From c0e1ba4e1792184964614987d67f9accfeb2cb84 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 4 Apr 2013 09:36:18 -0600 Subject: [PATCH 3/4] remote-bzr: remove stale check code for tests The fastimport plugin was only required in the early stage of development. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/test-bzr.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index b81052b61..845043201 100755 --- a/contrib/remote-helpers/test-bzr.sh +++ b/contrib/remote-helpers/test-bzr.sh @@ -17,20 +17,6 @@ if ! "$PYTHON_PATH" -c 'import bzrlib'; then test_done fi -cmd=' -import bzrlib -bzrlib.initialize() -import bzrlib.plugin -bzrlib.plugin.load_plugins() -import bzrlib.plugins.fastimport -' - -if ! "$PYTHON_PATH" -c "$cmd"; then - echo "consider setting BZR_PLUGIN_PATH=$HOME/.bazaar/plugins" 1>&2 - skip_all='skipping remote-bzr tests; bzr-fastimport not available' - test_done -fi - check () { (cd $1 && git log --format='%s' -1 && From 091e051e883a3b710430b11fea06e5ea735ec9dd Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 4 Apr 2013 09:36:19 -0600 Subject: [PATCH 4/4] remote-hg: fix hg-git test-case There was some lingering code that shouldn't have been there in the first place. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/test-hg-hg-git.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh index 7e3967f5b..3f253b7de 100755 --- a/contrib/remote-helpers/test-hg-hg-git.sh +++ b/contrib/remote-helpers/test-hg-hg-git.sh @@ -140,7 +140,6 @@ test_expect_success 'executable bit' ' git_clone_$x hgrepo-$x gitrepo2-$x && git_log gitrepo2-$x > log-$x done && - cp -r log-* output-* /tmp/foo/ && test_cmp output-hg output-git && test_cmp log-hg log-git