Rombobjörn

summaryrefslogtreecommitdiff
path: root/testsuite/run_tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/run_tests')
-rwxr-xr-xtestsuite/run_tests12
1 files changed, 9 insertions, 3 deletions
diff --git a/testsuite/run_tests b/testsuite/run_tests
index 35fcc23..f440f8d 100755
--- a/testsuite/run_tests
+++ b/testsuite/run_tests
@@ -1,7 +1,7 @@
#!/bin/sh
# Comfignat's testsuite
-# Copyright 2013 B. Persson, Bjorn@Rombobeorn.se
+# Copyright 2013 - 2014 B. Persson, Bjorn@Rombobeorn.se
#
# This material is provided as is, with absolutely no warranty expressed
# or implied. Any use is at your own risk.
@@ -90,8 +90,14 @@ for source_directory in "${outer_srcdir}"/testsuite/sources/* ; do
if sh -e -c ". ${outer_srcdir}/testsuite/library; . ${input_script}" >output 2>&1 ; then
# Check that the expected files and no others are present.
- LC_COLLATE=C sort -o files.expected files.expected
- if find "${srcdir}" "${builddir}" | LC_COLLATE=C sort | diff files.expected - >files.diff ; then
+ # Sort the list of expected files and remove duplicates.
+ LC_COLLATE=C sort -u -o files.expected files.expected
+ # List all files in the build directory except for the directory
+ # where intermediate files are suposed to be. List the files in the
+ # source directory separately if the directories are separate. Sort
+ # the combined list the same way as the list of expected files is
+ # sorted. Then compare the lists.
+ if ( find "${builddir}" | grep -v ^"${builddir}"/obj ; test "${relative_builddir}" != . && find "${srcdir}" ) | LC_COLLATE=C sort | diff files.expected - >files.diff ; then
# Check that the source files haven't been mangled.
cd "${source_directory}"