tests: fix 'find' portability issues
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 28 Jun 2013 06:33:33 +0000 (08:33 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Wed, 3 Jul 2013 06:39:41 +0000 (08:39 +0200)
Reported by Stefano Lattarini.
http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00000.html

* tests/output.at (AT_CHECK_OUTPUT): Use Perl instead.

tests/output.at

index 7dbc3db..6c98ef7 100644 (file)
@@ -37,10 +37,11 @@ foo: {};
 
 ]AT_BISON_CHECK([$3 $1 $5], 0)[
 # Ignore the files non-generated files
-]AT_CHECK([find . -type f -and -not -path './$1' -and -not -path './testsuite.log' |
-           sed 's,\./,,' |
-           sort |
-           xargs echo],
+]AT_CHECK([[find . -type f |
+           $PERL -ne '
+      s,\./,,; chomp;
+      push @file, $_ unless m{^($1|testsuite.log)$};
+      END { print join (" ", sort @file), "\n" }']],
           [], [$4
 ])[
 ]$6[