summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rwxr-xr-xtests/wrapper-compiler-errors3
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 00c0b4f..75f069f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -3,6 +3,7 @@
# with Tartan (and -Werror).
TEST_EXTENSIONS = .c
+AM_TESTS_ENVIRONMENT = export abs_top_builddir=$(abs_top_builddir);
C_LOG_COMPILER = $(top_srcdir)/tests/wrapper-compiler-errors
c_tests = \
diff --git a/tests/wrapper-compiler-errors b/tests/wrapper-compiler-errors
index 8e30771..3dc2a1a 100755
--- a/tests/wrapper-compiler-errors
+++ b/tests/wrapper-compiler-errors
@@ -21,7 +21,7 @@
# asserts there’s no error.
input_filename=$1
-temp_dir=`mktemp -d`
+temp_dir=`mktemp -d`/${abs_top_builddir}
tests_dir=`dirname $0`
tartan=${tests_dir}/../scripts/tartan
tartan_plugin=${tests_dir}/../clang-plugin/.libs/libtartan.so
@@ -46,6 +46,7 @@ template_name=`head -n 1 "${input_filename}" | \
echo "Using template ${template_name}."
# Split the input file up into sections, delimiting on ‘/*’ on a line by itself.
+mkdir -p ${temp_dir}/${srcdir}
tail -n +3 "${input_filename}" > "${temp_dir}/${input_filename}.tail"
csplit --keep-files --elide-empty-files --silent \
--prefix="${temp_dir}/${input_filename}_" \