mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-04 05:22:57 +03:00
Test suite: improvements
This commit is contained in:
@@ -11,14 +11,30 @@ FILE=${@: -1}
|
|||||||
if [[ $FILE == *"test-cases/regression/"* ]]
|
if [[ $FILE == *"test-cases/regression/"* ]]
|
||||||
then
|
then
|
||||||
AMOUNT=$(./regression_tests countall ../$FILE)
|
AMOUNT=$(./regression_tests countall ../$FILE)
|
||||||
|
RET=$?
|
||||||
|
if [ $RET -ne 0 ]; then
|
||||||
|
echo ":test-result: SKIP: json is not enabled. (regression/$RET) ../$FILE:$i"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
for i in `seq 1 $AMOUNT`; do
|
for i in `seq 1 $AMOUNT`; do
|
||||||
$VALGRIND $PARAM ./regression_tests ../$FILE:$i
|
$VALGRIND $PARAM ./regression_tests ../$FILE:$i
|
||||||
if [ $? -eq 139 ]; then
|
RET=$?
|
||||||
echo ":test-result: FAIL segfault: ../$FILE:$i"
|
if [ $RET -ne 0 ]; then
|
||||||
|
echo ":test-result: FAIL possible segfault/$RET: ../$FILE:$i"
|
||||||
fi
|
fi
|
||||||
echo $VALGRIND $PARAM ./regression_tests ../$FILE:$i
|
echo $VALGRIND $PARAM ./regression_tests ../$FILE:$i
|
||||||
done;
|
done;
|
||||||
else
|
else
|
||||||
$VALGRIND $PARAM ./unit_tests ../$FILE
|
$VALGRIND $PARAM ./unit_tests ../$FILE
|
||||||
|
RET=$?
|
||||||
|
if [ $RET -eq 127 ]
|
||||||
|
then
|
||||||
|
echo ":test-result: SKIP: json is not enabled. (unit/$RET) ../$FILE"
|
||||||
|
elif [ $RET -ne 0 ]
|
||||||
|
then
|
||||||
|
echo ":test-result: FAIL possible segfault: (unit/$RET) ../$FILE"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd - 1> /dev/null
|
cd - 1> /dev/null
|
||||||
|
Reference in New Issue
Block a user