X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftestsuite.at;fp=tests%2Ftestsuite.at;h=264a15fd6860dc5fb9ed558882a1116e3dab0b1b;hb=7d78f21c057ff50a823220d809ac38c3d907243c;hp=a569436bcc4a03578e8fcaa52e826e2e435d39ed;hpb=8d25251929c8f325bed0fff24192d5a87034b32e;p=sliver-openvswitch.git diff --git a/tests/testsuite.at b/tests/testsuite.at index a569436bc..264a15fd6 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -41,6 +41,45 @@ seq () { set `expr $1 + ${3-1}` $2 $3 done } + +if test "$IS_WIN32" = "yes"; then + pwd () { + command pwd -W "$@" + } + + diff () { + command diff --strip-trailing-cr "$@" + } + + kill () { + case "$1" in + -0) + shift + for i in $*; do + # tasklist will always have return code 0. + # If pid does exist, there will be a line with the pid. + if tasklist //fi "PID eq $i" | grep $i; then + : + else + return 1 + fi + done + return 0 + ;; + -[1-9]*) + shift + for i in $*; do + taskkill //F //PID $i + done + ;; + [1-9][1-9]*) + for i in $*; do + taskkill //F //PID $i + done + ;; + esac + } +fi ] m4_divert_pop([PREPARE_TESTS])