Skip to content

Commit

Permalink
CI/functest: improve Early Ctrl-C interrupt check
Browse files Browse the repository at this point in the history
make it more resilient by testing different timeouts
  • Loading branch information
nil0x42 committed Feb 17, 2019
1 parent 78fbd49 commit d06ef12
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/interface/phpsploit-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
###
### Early Ctrl-C interrupt (SIGINT)
###
timeout -s INT 0.05 $RAW_PHPSPLOIT --help > $TMPFILE-out 2> $TMPFILE
> $TMPFILE
# testing different timeouts because it depends on time needed
# to load phpsploit for current platform/interpreter
timeout -s INT 0.05 $RAW_PHPSPLOIT --help > $TMPFILE-out 2>> $TMPFILE
timeout -s INT 0.1 $RAW_PHPSPLOIT --help > $TMPFILE-out 2>> $TMPFILE
timeout -s INT 0.15 $RAW_PHPSPLOIT --help > $TMPFILE-out 2>> $TMPFILE
timeout -s INT 0.2 $RAW_PHPSPLOIT --help > $TMPFILE-out 2>> $TMPFILE
assert_contains $TMPFILE "\[-\] .* initialization interrupted$"
rm $TMPFILE-out

Expand Down

0 comments on commit d06ef12

Please # to comment.