From 5d900ea8ccb660d4d3bb9aaa08464fb9aae081f9 Mon Sep 17 00:00:00 2001 From: Björn Persson Date: Fri, 31 Jan 2014 08:32:17 +0100 Subject: Check that the right generated files exist. --- testsuite/run_tests | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'testsuite/run_tests') 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}" -- cgit v1.2.3