"Simon.Cathebras" <Simon.Cathebras@xxxxxxxxxxxxxxx> writes: > Appears to be a local problem. Did you managed to run the script when > this was fixed ? > > Anyway, please check out with the following wiki page if you have all > required package. Indeed, installing php5-cgi did it. I can now run the testsuite. But that would have been nice to get explicit error messages about this. > url: https://github.com/Fafinou/git/wiki This documentation should actually appear in the README file of your test environment. Wikis are nice to work collaboratively on a draft, but this kind of doc should really end up as close to the code as possible (currently, the code doesn't give a way to find the page above ...). While testing/reviewing, I fixed a few more issues (patch below). One thing I wanted to do was to let "install-wiki.sh" be launched from any directory, like "./t/install-wiki.sh install", but it's still not there, there are relative paths here and there that break it. Maybe we should just run cd "$WIKI_TEST_DIR" at the top. Or error out asking the user to cd himself. >From 084babd650376437d0fb4697d680d3c325316b7c Mon Sep 17 00:00:00 2001 From: Matthieu Moy <Matthieu.Moy@xxxxxxx> Date: Thu, 14 Jun 2012 18:13:20 +0200 Subject: [PATCH] More fixups --- contrib/mw-to-git/t/Makefile | 7 +++++-- contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 8 ++++---- contrib/mw-to-git/t/test-gitmw-lib.sh | 20 +++++++++++--------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/contrib/mw-to-git/t/Makefile b/contrib/mw-to-git/t/Makefile index 752fd1f..0212b85 100644 --- a/contrib/mw-to-git/t/Makefile +++ b/contrib/mw-to-git/t/Makefile @@ -17,10 +17,13 @@ T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) help: @echo 'Run "$(MAKE) test" to launch test scripts' - @echo 'Run "$(MAKE)" clean to remove trash folders' + @echo 'Run "$(MAKE) clean" to remove trash folders' test: - for t in $(T); do "./$$t"; done + @for t in $(T); do \ + echo "$$t"; \ + "./$$t" || { echo "$$t failed"; exit 1; } \ + done clean: $(RM) -r 'trash directory'.* diff --git a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh index ee7cc9e..0add2d5 100755 --- a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh +++ b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh @@ -101,7 +101,7 @@ test_expect_success 'Git push works with a wiki with accents' ' test_diff_directories mw_dir_6 ref_page_6 ' -test_expect_success 'Git clone works with accentsand spaces' ' +test_expect_success 'Git clone works with accents and spaces' ' wiki_reset && wiki_editpage "é à î" "this page must be délété before the clone" false && git clone mediawiki::http://'"$SERVER_ADDR:$PORT/$WIKI_DIR_NAME"' mw_dir_7 && @@ -166,7 +166,7 @@ test_expect_failure 'special character at the begining of file name from mw to g test -f mw_dir_11/[char_2 ' -test_expect_success 'test of correct formating for file name from mw to git' ' +test_expect_success 'correct formating for file name from mw to git' ' wiki_reset && git clone mediawiki::http://'"$SERVER_ADDR:$PORT/$WIKI_DIR_NAME"' mw_dir_12 && wiki_editpage char_%_7b_1 "expect to be renamed char{_1" false && @@ -184,7 +184,7 @@ test_expect_success 'test of correct formating for file name from mw to git' ' ' -test_expect_failure 'test of correct formating for file name begining with special character' ' +test_expect_failure 'correct formating for file name begining with special character' ' wiki_reset && git clone mediawiki::http://'"$SERVER_ADDR:$PORT/$WIKI_DIR_NAME"' mw_dir_13 && ( @@ -203,7 +203,7 @@ test_expect_failure 'test of correct formating for file name begining with speci ' -test_expect_success 'test of correct formating for file name from git to mw' ' +test_expect_success 'correct formating for file name from git to mw' ' wiki_reset && git clone mediawiki::http://'"$SERVER_ADDR:$PORT/$WIKI_DIR_NAME"' mw_dir_14 && ( diff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh index 36ac654..f444d1f 100644 --- a/contrib/mw-to-git/t/test-gitmw-lib.sh +++ b/contrib/mw-to-git/t/test-gitmw-lib.sh @@ -10,8 +10,12 @@ # CONFIGURATION VARIABLES # You might want to change these ones # +if test -z "$WIKI_TEST_DIR" +then + WIKI_TEST_DIR=. +fi -. ./test.config +. "$WIKI_TEST_DIR"/test.config export CURR_DIR=$(pwd) export TEST_DIRECTORY="$CURR_DIR"/../../../t @@ -87,7 +91,7 @@ test_diff_directories () { # # Check that <dir> contains exactly <N> files test_contains_N_files () { - test `ls "$1" | wc -l` -eq "$2"; + test `ls -- "$1" | wc -l` -eq "$2" } @@ -101,8 +105,7 @@ wiki_check_content () { #replacement of forbidden character in file name page_name=$(printf "%s\n" "$2" | sed -e "s/\//%2F/g") - diff -b "$1" wiki_tmp/"$page_name".mw - if test $? -ne 0 + if ! diff -b "$1" wiki_tmp/"$page_name".mw then rm -rf wiki_tmp error "ERROR: file $2 not found on wiki" @@ -268,9 +271,9 @@ start_lighttpd() { stop_lighttpd fi config_lighttpd - $LIGHTTPD_DIR/lighttpd -f $WEB/lighttpd.conf - - if test $? -ne 0 ; then + + if ! $LIGHTTPD_DIR/lighttpd -f $WEB/lighttpd.conf + then echo "Could not execute http deamon lighttpd" exit 1 fi @@ -280,9 +283,8 @@ start_lighttpd() { # # Kill daemon lighttpd and removes files and folders associated. stop_lighttpd () { - test -f "$WEB_TMP/pid" && kill $(cat "$WEB_TMP/pid") - rm -rf $WEB + rm -rf "$WEB" } # Create the SQLite database of the MediaWiki. If the database file already -- 1.7.11.rc0.57.g84a04c7 -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html