mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
FreeBSD has different prefix for bash (which is non-standard shell there), thus "make check-TESTS" actually was doing nothing: $ gmake check-TESTS ( 0/ 0/ 0): test/test-cases/regression/issue-1591.json ( 0/ 0/ 0): test/test-cases/regression/issue-1785.json ( 0/ 0/ 0): test/test-cases/regression/issue-1812.json ( 0/ 0/ 0): test/test-cases/regression/issue-1831.json ( 0/ 0/ 0): test/test-cases/regression/issue-1844.json ( 0/ 0/ 0): test/test-cases/regression/issue-1850.json [..] Testsuite summary for modsecurity 3.0
25 lines
545 B
Bash
Executable File
25 lines
545 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
cd test 1> /dev/null
|
|
|
|
length=$(($#-1))
|
|
array=${@:1:$length}
|
|
|
|
PARAM=$array
|
|
FILE=${@: -1}
|
|
|
|
if [[ $FILE == *"test-cases/regression/"* ]]
|
|
then
|
|
AMOUNT=$(./regression_tests countall ../$FILE)
|
|
for i in `seq 1 $AMOUNT`; do
|
|
$VALGRIND $PARAM ./regression_tests ../$FILE:$i
|
|
if [ $? -eq 139 ]; then
|
|
echo ":test-result: FAIL segfault: ../$FILE:$i"
|
|
fi
|
|
echo $VALGRIND $PARAM ./regression_tests ../$FILE:$i
|
|
done;
|
|
else
|
|
$VALGRIND $PARAM ./unit_tests ../$FILE
|
|
fi
|
|
cd - 1> /dev/null
|