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