#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later """Compare the real C renderer with the unmodified upstream public-domain font.""" import subprocess from pathlib import Path root=Path(__file__).resolve().parents[1] out=root/'test-output/font' out.mkdir(parents=True,exist_ok=True) exe=out/'video_test' subprocess.run(['clang','-std=c99','-Wall','-Wextra','-Werror','-pedantic', '-fsanitize=address,undefined','-DQUAD_HOST', *['-I'+str(root/p) for p in ['tests/include','src/game','src/platform','third_party/cardgame-font']], *[str(root/p) for p in ['tests/video_test.c','src/platform/video.c','src/game/rules.c','third_party/cardgame-font/8-bit-wide-font.c']], '-o',str(exe)],check=True) subprocess.run([str(exe),str(out/'font-and-borders.ppm')],check=True)