oas/validate.sh
omicron 0f9ced8eb1 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
2025-04-04 02:18:02 +02:00

19 lines
466 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
make analyze debug asan msan
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
$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')