aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/yacc/tests/yacc_tests.sh
blob: 08130355678fcd942a51463c4010bcd68670f2e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

set -e

# Setup the environment for run_test
# - run_test looks for `#define YYBTYACC` in ../config.h
# - run_test assumes a yacc binary exists in ../yacc instead of running "yacc"
# - run_test spams the test dir with files (polluting subsequent test runs),
#   so it's better to copy all the files to a temporary directory created by
#   kyua
echo > "./config.h"
mkdir "test"
cp -Rf "$(dirname "$0")"/* "test"
cp -p /usr/bin/yacc ./yacc

cd "test" && ./run_test