From 597dbf8802757d4b3f636865906584a16cdd4b43 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Wed, 27 Jun 2018 16:16:39 +0100 Subject: [PATCH 1/2] Adds a filter to run-test-suites.pl to exclude data files The run-test-suites.pl script was executing all files of the form 'test_suite*' which were either executable or ended with a .exe extension. On some filesystems, such as through network shares or VMs, which are abstracting one set of file permissions to Unix permissions, may set the executable permissions on all files, whether they're executable or not. That was leading to the run-test-suites.pl script to attempt to execute the .c intermediate files because they followed the form 'test_suite_*.c'. This change now excludes them, just in case they accidentally have execute permissions. --- tests/scripts/run-test-suites.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/scripts/run-test-suites.pl b/tests/scripts/run-test-suites.pl index 7e2974bbc..02f9a2f6f 100755 --- a/tests/scripts/run-test-suites.pl +++ b/tests/scripts/run-test-suites.pl @@ -35,8 +35,9 @@ if ( defined($switch) && ( $switch eq "-v" || $switch eq "--verbose" ) ) { # All test suites = executable files, excluding source files, debug # and profiling information, etc. We can't just grep {! /\./} because -#some of our test cases' base names contain a dot. +# some of our test cases' base names contain a dot. my @suites = grep { -x $_ || /\.exe$/ } glob 'test_suite_*'; +@suites = grep { !/\.c$/ && !/\.data$/ } @suites; die "$0: no test suite found\n" unless @suites; # in case test suites are linked dynamically From 6e3606e4f6b00a14e728fc5f866ba48fd1ecf5a0 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Sun, 30 Sep 2018 21:53:16 +0100 Subject: [PATCH 2/2] Fix run-test-suites.pl to screen for files Changes run-test-suites.pl to filter out directories, and select only files as on OSX, test coverage tests create .dSYM directories which were being accidentally selected to execute. --- tests/scripts/run-test-suites.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/run-test-suites.pl b/tests/scripts/run-test-suites.pl index 02f9a2f6f..f35dfab98 100755 --- a/tests/scripts/run-test-suites.pl +++ b/tests/scripts/run-test-suites.pl @@ -37,7 +37,7 @@ if ( defined($switch) && ( $switch eq "-v" || $switch eq "--verbose" ) ) { # and profiling information, etc. We can't just grep {! /\./} because # some of our test cases' base names contain a dot. my @suites = grep { -x $_ || /\.exe$/ } glob 'test_suite_*'; -@suites = grep { !/\.c$/ && !/\.data$/ } @suites; +@suites = grep { !/\.c$/ && !/\.data$/ && -f } @suites; die "$0: no test suite found\n" unless @suites; # in case test suites are linked dynamically