From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: John 'Warthog9' Hawley <warthog9@eaglescrag.net>,
John 'Warthog9' Hawley <warthog9@kernel.org>,
Petr Baudis <pasky@suse.cz>, Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH 1/8 v1] gitweb: Make running t9501 test with '--debug' reliable and usable
Date: Sat, 30 Jan 2010 23:30:38 +0100 [thread overview]
Message-ID: <1264890645-28310-2-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <1264890645-28310-1-git-send-email-jnareb@gmail.com>
Remove test_debug lines after 'snapshots: tgz only default format
enabled' and 'snapshots: all enabled in default, use default disabled
value' tests. Those tests constitute of multiple gitweb_run
invocation, therefore outputting gitweb.output for the last gitweb_run
wouldn't help much in debugging test failure, and can only confuse.
For snapshot tests which check for "200 OK" status, change
test_debug 'cat gitweb.output'
to
test_debug 'cat gitweb.headers'
Otherwise when running this test with '--debug' option,
t/t9501-gitweb-standalone-http-status.sh would dump *binary data* (the
snapshot itself) to standard output, which can mess up state of terminal
due to term control characters which can be embedded in output.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This patch appears in this series for the first time.
I have decided against cleaning up t/t9501-gitweb-standalone-http-status.sh
by conforming to single style of quoting and whitespaces, and by putting
initial test_commit inside test_expect_success setup. This is the minimal
change.
t/t9501-gitweb-standalone-http-status.sh | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh
index 0688a57..9e8bc01 100755
--- a/t/t9501-gitweb-standalone-http-status.sh
+++ b/t/t9501-gitweb-standalone-http-status.sh
@@ -33,7 +33,6 @@ test_expect_success \
grep "403 - Snapshot format not allowed" gitweb.output &&
gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
grep "403 - Unsupported snapshot format" gitweb.output'
-test_debug 'cat gitweb.output'
cat >>gitweb_config.perl <<\EOF
@@ -50,7 +49,6 @@ test_expect_success \
grep "403 - Snapshot format not allowed" gitweb.output &&
gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
grep "Status: 200 OK" gitweb.output'
-test_debug 'cat gitweb.output'
cat >>gitweb_config.perl <<\EOF
@@ -72,7 +70,7 @@ test_expect_success \
'snapshots: tgz explicitly enabled' \
'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
grep "Status: 200 OK" gitweb.output'
-test_debug 'cat gitweb.output'
+test_debug 'cat gitweb.headers'
# ----------------------------------------------------------------------
@@ -82,7 +80,7 @@ test_expect_success 'snapshots: good tree-ish id' '
gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
grep "Status: 200 OK" gitweb.output
'
-test_debug 'cat gitweb.output'
+test_debug 'cat gitweb.headers'
test_expect_success 'snapshots: bad tree-ish id' '
gitweb_run "p=.git;a=snapshot;h=frizzumFrazzum;sf=tgz" &&
@@ -105,7 +103,7 @@ test_expect_success 'snapshots: good object id' '
gitweb_run "p=.git;a=snapshot;h=$ID;sf=tgz" &&
grep "Status: 200 OK" gitweb.output
'
-test_debug 'cat gitweb.output'
+test_debug 'cat gitweb.headers'
test_expect_success 'snapshots: bad object id' '
gitweb_run "p=.git;a=snapshot;h=abcdef01234;sf=tgz" &&
--
1.6.6.1
next prev parent reply other threads:[~2010-01-30 22:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-30 22:30 [PATCH 0/8] Miscelanous gitweb improvements from 'Gitweb caching v5' by J.H Jakub Narebski
2010-01-30 22:30 ` Jakub Narebski [this message]
2010-01-30 22:30 ` [PATCH 2/8 v6] gitweb: Load checking Jakub Narebski
2010-01-30 22:30 ` [PATCH 3/8 v6] gitweb: Makefile improvements Jakub Narebski
2010-01-30 22:30 ` [PATCH 4/8 v6] gitweb: Check that $site_header etc. are defined before using them Jakub Narebski
2010-01-30 22:30 ` [PATCH 5/8 v6] gitweb: add a get function to compliment print_local_time Jakub Narebski
2010-01-31 0:21 ` Junio C Hamano
2010-01-30 22:30 ` [PATCH 6/8 v6] gitweb: add a get function to compliment print_sort_th Jakub Narebski
2010-01-30 22:30 ` [PATCH 7/8 v6] gitweb: Add optional extra parameter to die_error, for extended explanation Jakub Narebski
2010-01-30 22:30 ` [PATCH 8/8 v6] gitweb: Add an option to force version match Jakub Narebski
2010-02-02 1:01 ` J.H.
2010-02-02 1:35 ` Jakub Narebski
2010-02-02 3:19 ` Junio C Hamano
2010-02-02 5:26 ` Junio C Hamano
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=1264890645-28310-2-git-send-email-jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
--cc=warthog9@eaglescrag.net \
--cc=warthog9@kernel.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.
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).