From: Alan Jenkins <alan.christopher.jenkins@googlemail.com>
To: jeffpc@josefsipek.net
Cc: git@vger.kernel.org,
Alan Jenkins <alan.christopher.jenkins@googlemail.com>
Subject: [GUILT 4/6] Run regression tests in a directory which contains spaces
Date: Wed, 28 Sep 2011 15:15:22 +0100 [thread overview]
Message-ID: <1317219324-10319-4-git-send-email-alan.christopher.jenkins@googlemail.com> (raw)
In-Reply-To: <1317219324-10319-1-git-send-email-alan.christopher.jenkins@googlemail.com>
This helped me in finding some of the issues in the previous patch.
Signed-off-by: Alan Jenkins <alan.christopher.jenkins@googlemail.com>
---
regression/run-tests | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/regression/run-tests b/regression/run-tests
index 4cb3eb4..a10e796 100755
--- a/regression/run-tests
+++ b/regression/run-tests
@@ -9,9 +9,9 @@ source scaffold
# usage: empty_repo
function empty_repo
{
- rm -rf $REPODIR
- mkdir $REPODIR
- cd $REPODIR > /dev/null
+ rm -rf "$REPODIR"
+ mkdir "$REPODIR"
+ cd "$REPODIR" > /dev/null
git init 2> /dev/null > /dev/null
cd - > /dev/null
}
@@ -22,8 +22,9 @@ function test_failed
Test failed!
Test: $TESTNAME
-Repo dir: $REPODIR
Log file: $LOGFILE
+Repo dir: "$REPODIR"
+
DONE
exit 1
}
@@ -42,7 +43,9 @@ function check_test
# usage: run_test <test number>
function run_test
{
- export REPODIR="/tmp/guilt.reg.$RANDOM"
+ # We make sure we can handle space characters
+ # by including one in REPODIR.
+ export REPODIR="/tmp/guilt reg.$RANDOM"
export LOGFILE="/tmp/guilt.log.$RANDOM"
export TESTNAME="$1"
@@ -51,7 +54,7 @@ function run_test
empty_repo
# run the test
- cd $REPODIR > /dev/null
+ cd "$REPODIR" > /dev/null
"$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE"
ERR=$?
cd - > /dev/null
@@ -61,7 +64,7 @@ function run_test
echo "done."
- rm -rf $REPODIR $LOGFILE
+ rm -rf "$REPODIR" "$LOGFILE"
}
case "$1" in
--
1.7.4.1
next prev parent reply other threads:[~2011-09-28 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 14:15 [GUILT 1/6] Refuse to push corrupt patches Alan Jenkins
2011-09-28 14:15 ` [GUILT 2/6] guilt-header: fix patch corruption Alan Jenkins
2011-09-28 14:15 ` [GUILT 3/6] Handle paths that contain spaces Alan Jenkins
2011-09-28 14:15 ` Alan Jenkins [this message]
2011-09-28 14:15 ` [GUILT 5/6] Allow guilt scripts to be run from a directory which contains spaces Alan Jenkins
2011-09-28 14:15 ` [GUILT 6/6] Allow the regression tests to be run from a directory with spaces in Alan Jenkins
2011-09-30 17:15 ` [GUILT 1/6] Refuse to push corrupt patches Josef 'Jeff' Sipek
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317219324-10319-4-git-send-email-alan.christopher.jenkins@googlemail.com \
--to=alan.christopher.jenkins@googlemail.com \
--cc=git@vger.kernel.org \
--cc=jeffpc@josefsipek.net \
/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.
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 NNTP newsgroup(s).