xref: /freebsd/usr.bin/yacc/tests/yacc_tests.sh (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
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