summaryrefslogtreecommitdiff
path: root/t/maken.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-06-22 18:15:21 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-06-22 18:48:17 +0200
commit13dd512dae7f338426dfb152bc77c4c5fdd25278 (patch)
treeff6dc7b943a73cfd62b50e1cacd7ee3a626bae97 /t/maken.sh
parentdc18830f56e88efa2cd92e663d30b9d4f0f27f1b (diff)
downloadautomake-13dd512dae7f338426dfb152bc77c4c5fdd25278.tar.gz
tests: prefer using 'is_newest' over 'ls -t' hacks
To verify that a file 'new' is newer than the file 'old', it's much cleaner to use "is_newest new old" rather than the more clumsy "ls -t". Adjust several of our tests accordingly. * syntax-checks.mk (sc_tests_ls_t): New check, guard against uses of "ls -t" and similar. (syntax_check_rules): Add it. * t/maken.sh: Adjust. * t/autohdr4.sh: Likewise. * t/extradep2.sh: Likewise. * t/lex-depend-cxx.sh: Likewise. * t/extradep.sh: Likewise. * t/yacc-depend2.sh: Likewise. * t/yacc-pr204.sh: Likewise. * t/lex-pr204.sh: Likewise. * t/yacc8.sh: Likewise. * t/acloca13.sh: Likewise. * t/lex-depend.sh: Likewise, and enhance. * t/acloca14.sh: Likewise. * t/aclocal7.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/maken.sh')
-rwxr-xr-xt/maken.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/maken.sh b/t/maken.sh
index 86c40c3a5..1257e4a7f 100755
--- a/t/maken.sh
+++ b/t/maken.sh
@@ -47,7 +47,6 @@ $AUTOCONF
$AUTOMAKE
./configure
-$sleep
echo stamp > stampfile
$sleep
for target in dist distcheck; do
@@ -56,7 +55,8 @@ for target in dist distcheck; do
$MAKE -n $target | grep stamp-sub-dist-hook || Exit 1
fi
$MAKE test-no-distdir
- test $(ls -1t | sed 1q) = stampfile
+ # No file has been actually touched or created.
+ is_newest stampfile $(find .)
done
: