From 01185eb9c803cd7e23fbc484e7c6c3f4fedaf50a Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 10 Aug 2014 16:58:55 +0400 Subject: [PATCH 1/3] Use bgscript.sh in place of direct bash call --- tests/test_shells/bash.ok | 4 ++-- tests/test_shells/bb.ok | 4 ++-- tests/test_shells/bgscript.sh | 5 +++++ tests/test_shells/dash.ok | 4 ++-- tests/test_shells/input.bash | 2 +- tests/test_shells/input.bb | 2 +- tests/test_shells/input.dash | 2 +- tests/test_shells/input.fish | 2 +- tests/test_shells/input.mksh | 2 +- tests/test_shells/input.tcsh | 2 +- tests/test_shells/input.zsh | 2 +- tests/test_shells/mksh.ok | 2 +- tests/test_shells/test.sh | 1 + tests/test_shells/zsh.daemon.ok | Bin 12453 -> 12361 bytes tests/test_shells/zsh.nodaemon.ok | 4 ++-- 15 files changed, 22 insertions(+), 16 deletions(-) create mode 100755 tests/test_shells/bgscript.sh diff --git a/tests/test_shells/bash.ok b/tests/test_shells/bash.ok index 34ec242f..5fb00ea1 100644 --- a/tests/test_shells/bash.ok +++ b/tests/test_shells/bash.ok @@ -2,11 +2,11 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & [1] PID   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s -[1]+ Terminated bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' +[1]+ Terminated bgscript.sh   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd "$DIR1"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' diff --git a/tests/test_shells/bb.ok b/tests/test_shells/bb.ok index 8a439c05..350cf6e3 100644 --- a/tests/test_shells/bb.ok +++ b/tests/test_shells/bb.ok @@ -2,10 +2,10 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh &   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s -[1]+ Terminated bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" +[1]+ Terminated bgscript.sh   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  cd "$DIR1"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' diff --git a/tests/test_shells/bgscript.sh b/tests/test_shells/bgscript.sh new file mode 100755 index 00000000..71886e62 --- /dev/null +++ b/tests/test_shells/bgscript.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo $$ > pid +while true ; do + sleep 0.1s +done diff --git a/tests/test_shells/dash.ok b/tests/test_shells/dash.ok index 2a42cd64..7ab16d04 100644 --- a/tests/test_shells/dash.ok +++ b/tests/test_shells/dash.ok @@ -2,10 +2,10 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh &   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s -[1] + Terminated bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" +[1] + Terminated bgscript.sh cd "$DIR1"   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1    HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' diff --git a/tests/test_shells/input.bash b/tests/test_shells/input.bash index ff7ad797..3842c75f 100644 --- a/tests/test_shells/input.bash +++ b/tests/test_shells/input.bash @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +bgscript.sh & false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.bb b/tests/test_shells/input.bb index 2d4fbc42..bfe0f315 100644 --- a/tests/test_shells/input.bb +++ b/tests/test_shells/input.bb @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +bgscript.sh & false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.dash b/tests/test_shells/input.dash index 2d4fbc42..bfe0f315 100644 --- a/tests/test_shells/input.dash +++ b/tests/test_shells/input.dash @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +bgscript.sh & false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.fish b/tests/test_shells/input.fish index d256c6fa..1ffc8f11 100644 --- a/tests/test_shells/input.fish +++ b/tests/test_shells/input.fish @@ -9,7 +9,7 @@ cd .git cd .. setenv VIRTUAL_ENV "$HOME/.virtenvs/some-virtual-environment" setenv VIRTUAL_ENV -bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +bgscript.sh & false kill (cat pid) ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.mksh b/tests/test_shells/input.mksh index a2f0a7dd..52c1e59f 100644 --- a/tests/test_shells/input.mksh +++ b/tests/test_shells/input.mksh @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +bgscript.sh & false kill `cat pid` ; sleep 1 cd "$DIR1" diff --git a/tests/test_shells/input.tcsh b/tests/test_shells/input.tcsh index 3b5b1eb0..a888b10f 100644 --- a/tests/test_shells/input.tcsh +++ b/tests/test_shells/input.tcsh @@ -6,7 +6,7 @@ cd .git cd .. setenv VIRTUAL_ENV "/home/foo/.virtenvs/some-virtual-environment" unsetenv VIRTUAL_ENV -bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +bgscript.sh & false # Warning: currently tcsh bindings do not support job count kill `cat pid` ; sleep 1s cd $DIR1:q diff --git a/tests/test_shells/input.zsh b/tests/test_shells/input.zsh index 51095f5f..2f967499 100644 --- a/tests/test_shells/input.zsh +++ b/tests/test_shells/input.zsh @@ -14,7 +14,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +bgscript.sh & false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/mksh.ok b/tests/test_shells/mksh.ok index 09307716..278d5442 100644 --- a/tests/test_shells/mksh.ok +++ b/tests/test_shells/mksh.ok @@ -3,7 +3,7 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & [1] PID   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1 diff --git a/tests/test_shells/test.sh b/tests/test_shells/test.sh index 4aff414e..4a741aed 100755 --- a/tests/test_shells/test.sh +++ b/tests/test_shells/test.sh @@ -159,6 +159,7 @@ ln -s "$(which cut)" tests/shell/path ln -s "$(which bc)" tests/shell/path ln -s "$(which expr)" tests/shell/path ln -s "$(which mktemp)" tests/shell/path +ln -s ../../test_shells/bgscript.sh tests/shell/path for pexe in powerline powerline-config ; do if test -e scripts/$pexe ; then ln -s "$PWD/scripts/$pexe" tests/shell/path diff --git a/tests/test_shells/zsh.daemon.ok b/tests/test_shells/zsh.daemon.ok index 3582bc706c3cb143b0a69653a315f1300642a859..592929cebc6cdd2c640cc3aa3bae3d3cbd9262bf 100644 GIT binary patch delta 48 ucmZ3Qcrsyw6DL=CadJ^+L5W^*#^x%{U>0QlK}H3}$qI~fHy`4EtN;MT-V#Ir delta 140 zcmX?^urzUl6Q@ODafX6!vVwYQaz?&_ii%x9W{QHfLU~4JPO3slQE4iWlajAcoRgYb kpkSb9SPbUprK)fC;S6RWU-v;q1;)t=jB_`q@jq4o06|MEKmY&$ diff --git a/tests/test_shells/zsh.nodaemon.ok b/tests/test_shells/zsh.nodaemon.ok index daa84f40..8f1394d9 100644 --- a/tests/test_shells/zsh.nodaemon.ok +++ b/tests/test_shells/zsh.nodaemon.ok @@ -3,11 +3,11 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & [1] PID   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s -[1] + terminated bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' +[1] + terminated bgscript.sh   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd "$DIR1"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' From 7ade6d1fc028270b3bf9031e2271a630aab7ecc2 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 28 Jul 2014 03:15:36 +0400 Subject: [PATCH 2/3] Use busybox as shell name in place of bb Conflicts: tests/test_shells/test.sh --- tests/test_shells/{bb.ok => busybox.ok} | 0 tests/test_shells/{input.bb => input.busybox} | 0 tests/test_shells/test.sh | 16 ++++------------ 3 files changed, 4 insertions(+), 12 deletions(-) rename tests/test_shells/{bb.ok => busybox.ok} (100%) rename tests/test_shells/{input.bb => input.busybox} (100%) diff --git a/tests/test_shells/bb.ok b/tests/test_shells/busybox.ok similarity index 100% rename from tests/test_shells/bb.ok rename to tests/test_shells/busybox.ok diff --git a/tests/test_shells/input.bb b/tests/test_shells/input.busybox similarity index 100% rename from tests/test_shells/input.bb rename to tests/test_shells/input.busybox diff --git a/tests/test_shells/test.sh b/tests/test_shells/test.sh index 4a741aed..a1c1a61b 100755 --- a/tests/test_shells/test.sh +++ b/tests/test_shells/test.sh @@ -46,15 +46,7 @@ run_test() { test "x$ONLY_SHELL" = "x" || test "x$ONLY_SHELL" = "x$SH" || return 0 if ! which "${SH}" ; then - if test "x${SH}" = "xbb" ; then - if ! which busybox ; then - return 0 - fi - shift - ARGS=( busybox ash "$@" ) - else - return 0 - fi + return 0 fi export TEST_TYPE @@ -108,8 +100,8 @@ run_test() { dash) # ? ;; - bb) - bb --help + busybox) + busybox --help ;; *) ${SH} --version @@ -205,7 +197,7 @@ if test -z "${ONLY_SHELL}" || test "x${ONLY_SHELL%sh}" != "x${ONLY_SHELL}" || te FAILED=1 fi - if ! run_test $TEST_TYPE bb -i ; then + if ! run_test $TEST_TYPE busybox ash -i ; then FAILED=1 fi From fdd8f6df3cc47c0e10740e3c9aa68ab113d1e55c Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 10 Aug 2014 17:10:35 +0400 Subject: [PATCH 3/3] Wait for pid file to appear Should fix some rare bash test failures --- tests/test_shells/bash.ok | 2 +- tests/test_shells/busybox.ok | 2 +- tests/test_shells/dash.ok | 2 +- tests/test_shells/input.bash | 2 +- tests/test_shells/input.busybox | 2 +- tests/test_shells/input.dash | 2 +- tests/test_shells/input.fish | 2 +- tests/test_shells/input.mksh | 2 +- tests/test_shells/input.tcsh | 2 +- tests/test_shells/input.zsh | 2 +- tests/test_shells/mksh.ok | 2 +- tests/test_shells/test.sh | 2 ++ tests/test_shells/waitpid.sh | 4 ++++ tests/test_shells/zsh.daemon.ok | Bin 12361 -> 12372 bytes tests/test_shells/zsh.nodaemon.ok | 2 +- 15 files changed, 18 insertions(+), 12 deletions(-) create mode 100755 tests/test_shells/waitpid.sh diff --git a/tests/test_shells/bash.ok b/tests/test_shells/bash.ok index 5fb00ea1..0ee4e9b6 100644 --- a/tests/test_shells/bash.ok +++ b/tests/test_shells/bash.ok @@ -2,7 +2,7 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s diff --git a/tests/test_shells/busybox.ok b/tests/test_shells/busybox.ok index 350cf6e3..760d7d03 100644 --- a/tests/test_shells/busybox.ok +++ b/tests/test_shells/busybox.ok @@ -2,7 +2,7 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1]+ Terminated bgscript.sh diff --git a/tests/test_shells/dash.ok b/tests/test_shells/dash.ok index 7ab16d04..2ad24b25 100644 --- a/tests/test_shells/dash.ok +++ b/tests/test_shells/dash.ok @@ -2,7 +2,7 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1] + Terminated bgscript.sh diff --git a/tests/test_shells/input.bash b/tests/test_shells/input.bash index 3842c75f..47042cf9 100644 --- a/tests/test_shells/input.bash +++ b/tests/test_shells/input.bash @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bgscript.sh & +bgscript.sh & waitpid.sh false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.busybox b/tests/test_shells/input.busybox index bfe0f315..d5b11b12 100644 --- a/tests/test_shells/input.busybox +++ b/tests/test_shells/input.busybox @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bgscript.sh & +bgscript.sh & waitpid.sh false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.dash b/tests/test_shells/input.dash index bfe0f315..d5b11b12 100644 --- a/tests/test_shells/input.dash +++ b/tests/test_shells/input.dash @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bgscript.sh & +bgscript.sh & waitpid.sh false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.fish b/tests/test_shells/input.fish index 1ffc8f11..eda074e9 100644 --- a/tests/test_shells/input.fish +++ b/tests/test_shells/input.fish @@ -9,7 +9,7 @@ cd .git cd .. setenv VIRTUAL_ENV "$HOME/.virtenvs/some-virtual-environment" setenv VIRTUAL_ENV -bgscript.sh & +bgscript.sh & waitpid.sh false kill (cat pid) ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/input.mksh b/tests/test_shells/input.mksh index 52c1e59f..0b0b4904 100644 --- a/tests/test_shells/input.mksh +++ b/tests/test_shells/input.mksh @@ -8,7 +8,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bgscript.sh & +bgscript.sh & waitpid.sh false kill `cat pid` ; sleep 1 cd "$DIR1" diff --git a/tests/test_shells/input.tcsh b/tests/test_shells/input.tcsh index a888b10f..297cff9c 100644 --- a/tests/test_shells/input.tcsh +++ b/tests/test_shells/input.tcsh @@ -6,7 +6,7 @@ cd .git cd .. setenv VIRTUAL_ENV "/home/foo/.virtenvs/some-virtual-environment" unsetenv VIRTUAL_ENV -bgscript.sh & +bgscript.sh & waitpid.sh false # Warning: currently tcsh bindings do not support job count kill `cat pid` ; sleep 1s cd $DIR1:q diff --git a/tests/test_shells/input.zsh b/tests/test_shells/input.zsh index 2f967499..228a9ca9 100644 --- a/tests/test_shells/input.zsh +++ b/tests/test_shells/input.zsh @@ -14,7 +14,7 @@ cd .git cd .. VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= -bgscript.sh & +bgscript.sh & waitpid.sh false kill `cat pid` ; sleep 1s cd "$DIR1" diff --git a/tests/test_shells/mksh.ok b/tests/test_shells/mksh.ok index 278d5442..4770aff1 100644 --- a/tests/test_shells/mksh.ok +++ b/tests/test_shells/mksh.ok @@ -3,7 +3,7 @@   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd ..   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"   HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1 diff --git a/tests/test_shells/test.sh b/tests/test_shells/test.sh index a1c1a61b..b7302d89 100755 --- a/tests/test_shells/test.sh +++ b/tests/test_shells/test.sh @@ -78,6 +78,7 @@ run_test() { sleep 0.1s done ./tests/test_shells/postproc.py ${TEST_TYPE} ${SH} + rm -f tests/shell/3rd/pid if ! check_screen_log ${TEST_TYPE} ${SH} ; then echo '____________________________________________________________' # Repeat the diff to make it better viewable in travis output @@ -152,6 +153,7 @@ ln -s "$(which bc)" tests/shell/path ln -s "$(which expr)" tests/shell/path ln -s "$(which mktemp)" tests/shell/path ln -s ../../test_shells/bgscript.sh tests/shell/path +ln -s ../../test_shells/waitpid.sh tests/shell/path for pexe in powerline powerline-config ; do if test -e scripts/$pexe ; then ln -s "$PWD/scripts/$pexe" tests/shell/path diff --git a/tests/test_shells/waitpid.sh b/tests/test_shells/waitpid.sh new file mode 100755 index 00000000..8d98e216 --- /dev/null +++ b/tests/test_shells/waitpid.sh @@ -0,0 +1,4 @@ +#!/bin/sh +while ! test -e pid ; do + sleep 0.1s +done diff --git a/tests/test_shells/zsh.daemon.ok b/tests/test_shells/zsh.daemon.ok index 592929cebc6cdd2c640cc3aa3bae3d3cbd9262bf..d57f21828c6a9bf88c39fb4aeac747aae4a596c6 100644 GIT binary patch delta 24 fcmX?^a3x`bA1Aj$d17WsL1v0xamHpp&fjVPef$Zw delta 12 TcmcbTa57