From: Ramsay Jones Date: Sun, 6 Oct 2013 20:50:46 +0000 (+0100) Subject: gitweb test: fix highlight test hang on Linux Mint X-Git-Tag: rs/ref-transaction-1~601^2 X-Git-Url: https://repo.or.cz/w/git/jrn.git/commitdiff_plain/7202db86478390ead1b5ca6c6d47d44badff10f3 gitweb test: fix highlight test hang on Linux Mint Linux Mint has an implementation of the highlight command (unrelated to the one from http://www.andre-simon.de) that works as a simple filter. The script uses 'sed' to add terminal colour escape codes around text matching a regular expression. When t9500-*.sh attempts to run "highlight --version", the script simply hangs waiting for input. (See https://bugs.launchpad.net/linuxmint/+bug/815005). The tool required by gitweb can be installed from the 'highlight' package. Unfortunately, given the default $PATH, this leads to the tool having lower precedence than the script. In order to avoid hanging the test, add ' Signed-off-by: Jonathan Nieder --- diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh index 4f2b9b062b..ad8cd0613d 100755 --- a/t/t9500-gitweb-standalone-no-errors.sh +++ b/t/t9500-gitweb-standalone-no-errors.sh @@ -654,9 +654,11 @@ cat >>gitweb_config.perl <<\EOF $feature{'highlight'}{'override'} = 1; EOF -highlight --version >/dev/null 2>&1 +highlight_version=$(highlight --version /dev/null) if [ $? -eq 127 ]; then - say "Skipping syntax highlighting test, because 'highlight' was not found" + say "Skipping syntax highlighting tests: 'highlight' not found" +elif test -z "$highlight_version"; then + say "Skipping syntax highlighting tests: incorrect 'highlight' found" else test_set_prereq HIGHLIGHT fi