#!/bin/bash # Build and run the schemagen regression tests. # Expects weaseljson to be built at ../../build (the default CMake build dir). set -euo pipefail cd "$(dirname "$0")" python3 weaseljson_schemagen.py example.schema.json -o gen.h --namespace weasel_schema python3 weaseljson_schemagen.py big.schema.json -o big.h --namespace big_schema g++ -std=c++20 -I../../include -I. test_gen.cpp \ -L../../build -lweaseljson \ -Wl,-rpath,'$ORIGIN'/../../build \ -o test_gen g++ -std=c++20 -I../../include -I. test_big.cpp \ -L../../build -lweaseljson \ -Wl,-rpath,'$ORIGIN'/../../build \ -o test_big ./test_gen ./test_big