Rework the build system to be more modular
Split most of the work off into make/base.mk and allow for easy wrappers to be created around that that can build with different instrumentation in their own build directory. Create wrappers for the following: - release build - debug build - afl++ fuzzing build - static analysis with clang - clang memory sanitizer - clang address/undefined sanitizer
This commit is contained in:
16
validate.sh
16
validate.sh
@ -2,19 +2,17 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Start with static analysis
|
||||
make clean all
|
||||
mkdir -p reports/static-analysis
|
||||
scan-build -o reports/static-analysis/ -plist-html --status-bugs make all
|
||||
make analyze debug asan msan
|
||||
|
||||
# Run the sanitizer builds and valgrind
|
||||
make clean sanitize all
|
||||
ASAN=build/asan/oas
|
||||
MSAN=build/msan/oas
|
||||
DEBUG=build/debug/oas
|
||||
|
||||
ARGUMENTS=("tokens" "text" "ast")
|
||||
while IFS= read -r INPUT_FILE; do
|
||||
for ARGS in ${ARGUMENTS[@]}; do
|
||||
./oas-asan $ARGS $INPUT_FILE > /dev/null
|
||||
./oas-msan $ARGS $INPUT_FILE > /dev/null
|
||||
valgrind --leak-check=full --error-exitcode=1 ./oas $ARGS $INPUT_FILE >/dev/null
|
||||
$ASAN $ARGS $INPUT_FILE > /dev/null
|
||||
$MSAN $ARGS $INPUT_FILE > /dev/null
|
||||
valgrind --leak-check=full --error-exitcode=1 $DEBUG $ARGS $INPUT_FILE >/dev/null
|
||||
done
|
||||
done < <(find tests/input/ -type f -name '*.asm')
|
||||
|
Reference in New Issue
Block a user