Decoupled fuzzy and unit tests
This commit is contained in:
@@ -197,6 +197,7 @@ script:
|
|||||||
#after_script:
|
#after_script:
|
||||||
- cd tests
|
- cd tests
|
||||||
- ./do.sh
|
- ./do.sh
|
||||||
|
- ./do-unit.sh
|
||||||
|
|
||||||
#after_success:
|
#after_success:
|
||||||
#- cd ${TRAVIS_BUILD_DIR}
|
#- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
|||||||
Executable
+32
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd "$(dirname "${0}")"
|
||||||
|
|
||||||
|
UNIT="./unit/unit"
|
||||||
|
|
||||||
|
RC=0
|
||||||
|
|
||||||
|
check_unit() {
|
||||||
|
|
||||||
|
case "$CXXFLAGS" in
|
||||||
|
# Skipping tests with sanitizer enabled due to use-of-uninitialized-value in json-c
|
||||||
|
*sanitize* )
|
||||||
|
echo "Skipping unit tests for this environment"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo ""
|
||||||
|
echo "Running unit tests.."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
$UNIT
|
||||||
|
UNIT_RC=$?
|
||||||
|
if [ $UNIT_RC -ne 0 ]; then
|
||||||
|
RC=1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_unit
|
||||||
|
|
||||||
|
exit $RC
|
||||||
-23
@@ -3,7 +3,6 @@
|
|||||||
cd "$(dirname "${0}")"
|
cd "$(dirname "${0}")"
|
||||||
|
|
||||||
READER="../example/ndpiReader -p ../example/protos.txt -c ../example/categories.txt"
|
READER="../example/ndpiReader -p ../example/protos.txt -c ../example/categories.txt"
|
||||||
UNIT="./unit/unit"
|
|
||||||
|
|
||||||
RC=0
|
RC=0
|
||||||
PCAPS=`cd pcap; /bin/ls *.pcap`
|
PCAPS=`cd pcap; /bin/ls *.pcap`
|
||||||
@@ -46,30 +45,8 @@ check_results() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
check_unit() {
|
|
||||||
|
|
||||||
case "$CXXFLAGS" in
|
|
||||||
# Skipping tests with sanitizer enabled due to use-of-uninitialized-value in json-c
|
|
||||||
*sanitize* )
|
|
||||||
echo "Skipping unit tests for this environment"
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
echo ""
|
|
||||||
echo "Running unit tests.."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
$UNIT
|
|
||||||
UNIT_RC=$?
|
|
||||||
if [ $UNIT_RC -ne 0 ]; then
|
|
||||||
RC=1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
fuzzy_testing
|
fuzzy_testing
|
||||||
build_results
|
build_results
|
||||||
check_results
|
check_results
|
||||||
check_unit
|
|
||||||
|
|
||||||
exit $RC
|
exit $RC
|
||||||
|
|||||||
Reference in New Issue
Block a user