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