xref: /freebsd/usr.bin/yacc/tests/yacc_tests.sh (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1#!/bin/sh
2
3set -e
4
5# Setup the environment for run_test
6# - run_test looks for `#define YYBTYACC` in ../config.h
7# - run_test assumes a yacc binary exists in ../yacc instead of running "yacc"
8# - run_test spams the test dir with files (polluting subsequent test runs),
9#   so it's better to copy all the files to a temporary directory created by
10#   kyua
11echo > "./config.h"
12mkdir "test"
13cp -Rf "$(dirname "$0")"/* "test"
14cp -p /usr/bin/yacc ./yacc
15
16cd "test" && ./run_test
17