1268811Sbapt#!/bin/sh
2268811Sbapt# $FreeBSD: releng/11.0/usr.bin/yacc/tests/yacc_tests.sh 269884 2014-08-12 17:51:26Z ngie $
3268811Sbapt
4268811Sbaptset -e
5268811Sbapt
6269884Sngie# Setup the environment for run_test
7269884Sngie# - run_test looks for `#define YYBTYACC` in ../config.h
8269884Sngie# - run_test assumes a yacc binary exists in ../yacc instead of running "yacc"
9269884Sngie# - run_test spams the test dir with files (polluting subsequent test runs),
10269884Sngie#   so it's better to copy all the files to a temporary directory created by
11269884Sngie#   kyua
12269884Sngieecho > "./config.h"
13269884Sngiemkdir "test"
14269884Sngiecp -Rf "$(dirname "$0")"/* "test"
15269884Sngiecp -p /usr/bin/yacc ./yacc
16268811Sbapt
17269884Sngiecd "test" && ./run_test
18