#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later """Host-only input/persistence regression suites; CoCo qualification is separate.""" import subprocess from pathlib import Path root=Path(__file__).resolve().parents[1] out=root/'test-output/components' out.mkdir(parents=True,exist_ok=True) for name in ['input','store']: exe=out/(name+'_test') subprocess.run(['clang','-std=c89','-Wall','-Wextra','-Werror','-pedantic', '-fsanitize=address,undefined','-DQUAD_HOST','-I'+str(root/'src/game'), str(root/'tests'/(name+'_test.c')),str(root/'src/game'/(name+'.c')), '-o',str(exe)],check=True) subprocess.run([str(exe)],check=True)