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