From: Junio C Hamano Date: Fri, 18 Jan 2019 21:49:56 +0000 (-0800) Subject: Merge branch 'sg/stress-test' X-Git-Tag: v2.21.0-rc0~80 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3fe47ff44441de609d76fcd2dd510f66b6d84353?hp=-c Merge branch 'sg/stress-test' Flaky tests can now be repeatedly run under load with the "--stress" option. * sg/stress-test: test-lib: add the '--stress' option to run a test repeatedly under load test-lib-functions: introduce the 'test_set_port' helper function test-lib: set $TRASH_DIRECTORY earlier test-lib: consolidate naming of test-results paths test-lib: parse command line options earlier test-lib: parse options in a for loop to keep $@ intact test-lib: extract Bash version check for '-x' tracing test-lib: translate SIGTERM and SIGHUP to an exit --- 3fe47ff44441de609d76fcd2dd510f66b6d84353 diff --combined t/lib-git-daemon.sh index fd41229a8f,41eb1e3ae8..79db3b7ae5 --- a/t/lib-git-daemon.sh +++ b/t/lib-git-daemon.sh @@@ -28,7 -28,7 +28,7 @@@ the test_skip_or_die $GIT_TEST_GIT_DAEMON "file system does not support FIFOs" fi - LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-${this_test#t}} + test_set_port LIB_GIT_DAEMON_PORT GIT_DAEMON_PID= GIT_DAEMON_DOCUMENT_ROOT_PATH="$PWD"/repo @@@ -54,11 -54,19 +54,11 @@@ start_git_daemon() "$@" "$GIT_DAEMON_DOCUMENT_ROOT_PATH" \ >&3 2>git_daemon_output & GIT_DAEMON_PID=$! - >daemon.log { read -r line <&7 - printf "%s\n" "$line" - printf >&4 "%s\n" "$line" - ( - while read -r line <&7 - do - printf "%s\n" "$line" - printf >&4 "%s\n" "$line" - done - ) & - } 7>"$TRASH_DIRECTORY/daemon.log" && + printf "%s\n" "$line" >&4 + cat <&7 >&4 & + } 7