File: test-suite.sh

package info (click to toggle)
modsecurity 3.0.3-1+deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 41,992 kB
  • sloc: cpp: 25,929; ansic: 15,785; sh: 5,357; python: 3,556; yacc: 2,896; makefile: 1,394; lex: 1,344; perl: 464; ruby: 69; php: 42
file content (24 lines) | stat: -rwxr-xr-x 537 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/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