git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Robin H. Johnson" <robbat2@gentoo.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: [PATCH 2/4] tests: remove exit after test_done call
Date: Fri, 3 Apr 2009 15:31:10 -0400	[thread overview]
Message-ID: <20090403193110.GB5547@coredump.intra.peff.net> (raw)
In-Reply-To: <20090403192700.GA14965@coredump.intra.peff.net>

test_done always exits, so this line is never executed.

Signed-off-by: Jeff King <peff@peff.net>
---
A cleanup I noticed while adding more test skipping. Technically these
lines were not hurting anything, but I think it prevents a reader from
wondering why some test_done instances are followed by exit and some are
not.

And just look at that diffstat line count. It _must_ be an improvement!

 t/lib-git-svn.sh                       |    4 ----
 t/lib-httpd.sh                         |    3 ---
 t/t4004-diff-rename-symlink.sh         |    1 -
 t/t4011-diff-symlink.sh                |    1 -
 t/t4023-diff-rename-typechange.sh      |    1 -
 t/t4114-apply-typechange.sh            |    1 -
 t/t4115-apply-symlink.sh               |    1 -
 t/t4122-apply-symlink-inside.sh        |    1 -
 t/t5503-tagfollow.sh                   |    1 -
 t/t5522-pull-symlink.sh                |    1 -
 t/t5540-http-push.sh                   |    1 -
 t/t7005-editor.sh                      |    1 -
 t/t9200-git-cvsexportcommit.sh         |    1 -
 t/t9400-git-cvsserver-server.sh        |    2 --
 t/t9401-git-cvsserver-crlf.sh          |    2 --
 t/t9500-gitweb-standalone-no-errors.sh |    1 -
 t/t9600-cvsimport.sh                   |    3 ---
 17 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index de384e6..cdd7ccd 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -7,7 +7,6 @@ if test -n "$NO_SVN_TESTS"
 then
 	say 'skipping git svn tests, NO_SVN_TESTS defined'
 	test_done
-	exit
 fi
 
 GIT_DIR=$PWD/.git
@@ -19,7 +18,6 @@ if test $? -ne 1
 then
     say 'skipping git svn tests, svn not found'
     test_done
-    exit
 fi
 
 svnrepo=$PWD/svnrepo
@@ -43,7 +41,6 @@ then
 	fi
 	say "$err"
 	test_done
-	exit
 fi
 
 rawsvnrepo="$svnrepo"
@@ -144,7 +141,6 @@ require_svnserve () {
     then
         say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
         test_done
-        exit
     fi
 }
 
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 589aaf8..cde659d 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -8,7 +8,6 @@ then
 	say "skipping test, network testing disabled by default"
 	say "(define GIT_TEST_HTTPD to enable)"
 	test_done
-	exit
 fi
 
 HTTPD_PARA=""
@@ -36,7 +35,6 @@ if ! test -x "$LIB_HTTPD_PATH"
 then
 	say "skipping test, no web server found at '$LIB_HTTPD_PATH'"
 	test_done
-	exit
 fi
 
 HTTPD_VERSION=`$LIB_HTTPD_PATH -v | \
@@ -50,7 +48,6 @@ then
 		then
 			say "skipping test, at least Apache version 2 is required"
 			test_done
-			exit
 		fi
 
 		LIB_HTTPD_MODULE_PATH="$DEFAULT_HTTPD_MODULE_PATH"
diff --git a/t/t4004-diff-rename-symlink.sh b/t/t4004-diff-rename-symlink.sh
index 3db7444..a4da119 100755
--- a/t/t4004-diff-rename-symlink.sh
+++ b/t/t4004-diff-rename-symlink.sh
@@ -16,7 +16,6 @@ if ! test_have_prereq SYMLINKS
 then
 	say 'Symbolic links not supported, skipping tests.'
 	test_done
-	exit
 fi
 
 test_expect_success \
diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh
index 3a81309..d7e327c 100755
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
@@ -13,7 +13,6 @@ if ! test_have_prereq SYMLINKS
 then
 	say 'Symbolic links not supported, skipping tests.'
 	test_done
-	exit
 fi
 
 cat > expected << EOF
diff --git a/t/t4023-diff-rename-typechange.sh b/t/t4023-diff-rename-typechange.sh
index 5099862..9bdf659 100755
--- a/t/t4023-diff-rename-typechange.sh
+++ b/t/t4023-diff-rename-typechange.sh
@@ -8,7 +8,6 @@ if ! test_have_prereq SYMLINKS
 then
 	say 'Symbolic links not supported, skipping tests.'
 	test_done
-	exit
 fi
 
 test_expect_success setup '
diff --git a/t/t4114-apply-typechange.sh b/t/t4114-apply-typechange.sh
index 7dc35de..99ec13d 100755
--- a/t/t4114-apply-typechange.sh
+++ b/t/t4114-apply-typechange.sh
@@ -13,7 +13,6 @@ if ! test_have_prereq SYMLINKS
 then
 	say 'Symbolic links not supported, skipping tests.'
 	test_done
-	exit
 fi
 
 test_expect_success 'setup repository and commits' '
diff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh
index 1a3aea3..b852e58 100755
--- a/t/t4115-apply-symlink.sh
+++ b/t/t4115-apply-symlink.sh
@@ -13,7 +13,6 @@ if ! test_have_prereq SYMLINKS
 then
 	say 'Symbolic links not supported, skipping tests.'
 	test_done
-	exit
 fi
 
 test_expect_success setup '
diff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh
index 8aad20b..0d3c1d5 100755
--- a/t/t4122-apply-symlink-inside.sh
+++ b/t/t4122-apply-symlink-inside.sh
@@ -7,7 +7,6 @@ if ! test_have_prereq SYMLINKS
 then
 	say 'Symbolic links not supported, skipping tests.'
 	test_done
-	exit
 fi
 
 lecho () {
diff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh
index e75ccbc..d5db75d 100755
--- a/t/t5503-tagfollow.sh
+++ b/t/t5503-tagfollow.sh
@@ -8,7 +8,6 @@ case $(uname -s) in
 *MINGW*)
 	say "GIT_DEBUG_SEND_PACK not supported - skipping tests"
 	test_done
-	exit
 esac
 
 # End state of the repository:
diff --git a/t/t5522-pull-symlink.sh b/t/t5522-pull-symlink.sh
index d887eb6..86bbd7d 100755
--- a/t/t5522-pull-symlink.sh
+++ b/t/t5522-pull-symlink.sh
@@ -8,7 +8,6 @@ if ! test_have_prereq SYMLINKS
 then
 	say 'Symbolic links not supported, skipping tests.'
 	test_done
-	exit
 fi
 
 # The scenario we are building:
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index c46592f..5fe479e 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -17,7 +17,6 @@ if git http-push > /dev/null 2>&1 || [ $? -eq 128 ]
 then
 	say "skipping test, USE_CURL_MULTI is not defined"
 	test_done
-	exit
 fi
 
 . "$TEST_DIRECTORY"/lib-httpd.sh
diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index e83bc8f..b647957 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -92,7 +92,6 @@ if ! echo 'echo space > "$1"' > "e space.sh"
 then
 	say "Skipping; FS does not support spaces in filenames"
 	test_done
-	exit
 fi
 
 test_expect_success 'editor with a space' '
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 995f607..3665692 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -11,7 +11,6 @@ if test $? -ne 1
 then
     say 'skipping git cvsexportcommit tests, cvs not found'
     test_done
-    exit
 fi
 
 CVSROOT=$(pwd)/cvsroot
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 466240c..39185db 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -15,12 +15,10 @@ if test $? -ne 1
 then
     say 'skipping git-cvsserver tests, cvs not found'
     test_done
-    exit
 fi
 perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
     say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
     test_done
-    exit
 }
 
 unset GIT_DIR GIT_CONFIG
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
index 8882230..12e0e50 100755
--- a/t/t9401-git-cvsserver-crlf.sh
+++ b/t/t9401-git-cvsserver-crlf.sh
@@ -51,12 +51,10 @@ if test $? -ne 1
 then
     say 'skipping git-cvsserver tests, cvs not found'
     test_done
-    exit
 fi
 perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
     say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
     test_done
-    exit
 }
 
 unset GIT_DIR GIT_CONFIG
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 9ec5030..0bd332c 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -68,7 +68,6 @@ gitweb_run () {
 perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
     say 'skipping gitweb tests, perl version is too old'
     test_done
-    exit
 }
 
 gitweb_init
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index d2379e7..33eb519 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -14,7 +14,6 @@ if ! type cvs >/dev/null 2>&1
 then
 	say 'skipping cvsimport tests, cvs not found'
 	test_done
-	exit
 fi
 
 cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
@@ -24,12 +23,10 @@ case "$cvsps_version" in
 '')
 	say 'skipping cvsimport tests, cvsps not found'
 	test_done
-	exit
 	;;
 *)
 	say 'skipping cvsimport tests, unsupported cvsps version'
 	test_done
-	exit
 	;;
 esac
 
-- 
1.6.2.2.569.g2d4b2

  parent reply	other threads:[~2009-04-03 19:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03  7:03 [PATCH] NO_PERL support Robin H. Johnson
2009-04-03 13:20 ` Jeff King
2009-04-03 14:51   ` Johannes Schindelin
2009-04-03 14:53     ` Jeff King
2009-04-03 15:02       ` Johannes Schindelin
2009-04-03 15:11         ` Miklos Vajna
2009-04-03 15:16         ` Jeff King
2009-04-03 17:54   ` Johannes Sixt
2009-04-03 18:37     ` Jeff King
2009-04-03 15:46 ` Jeff King
2009-04-03 15:59   ` Robin H. Johnson
2009-04-03 16:18     ` Jeff King
2009-04-03 16:25 ` Junio C Hamano
2009-04-03 17:15   ` Jeff King
2009-04-03 20:20     ` Junio C Hamano
2009-04-03 20:56       ` Jeff King
2009-04-03 19:27 ` [PATCH 0/4] " Jeff King
2009-04-03 19:28   ` [PATCH 1/4] commit: abort commit if interactive add failed Jeff King
2009-04-03 19:31   ` Jeff King [this message]
2009-04-03 19:32   ` [PATCH 3/4] Makefile: allow building without perl Jeff King
2009-04-04 22:47     ` Robin H. Johnson
2009-04-04 23:39       ` Jeff King
2009-04-04 23:51         ` Robin H. Johnson
2009-04-04 23:56           ` Jeff King
2009-04-05  0:06             ` Robin H. Johnson
2009-04-07  7:27               ` Jeff King
2009-04-03 19:33   ` [PATCH 4/4] tests: skip perl tests if NO_PERL is defined Jeff King
2009-04-04 23:30     ` Robin H. Johnson
2009-04-04 23:42       ` Jeff King
2009-04-07  7:31   ` [PATCH 0/4] NO_PERL support Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090403193110.GB5547@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=robbat2@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).