1
0
Files
TP-Link_XR500v_v2-6/automake-1.11/tests/gen-parallel-tests
2016-11-30 09:03:17 +08:00

27 lines
737 B
Bash
Executable File

#! /bin/sh
# Generate parallel-tests.am.
#
# For each test in the TESTS list in this Makefile.am file, that itself
# tests features of the TESTS automake interface, generate a sibling
# test that does likewise, but with the option `parallel-tests' enabled.
set -e
tests=`sed -n '/^TESTS =/,/^$/s/\(.*\.test\).*/\1/p' Makefile.am`
{
grep -l '^TESTS ' $tests
grep -l ' TESTS ' $tests
} |
grep -v '.-p\.test' |
LC_ALL=C sort -u |
while read tst; do
if grep '^[^#]*parallel-tests' $tst >/dev/null \
|| grep '^\. \./defs-p' $tst >/dev/null
then :; else echo $tst; fi;
done |
{
echo "## Generated by gen-parallel-tests. Edit Makefile.am instead of this."
echo "parallel_tests = \\"
sed 's,\.test$,-p.test,; $!s,$, \\,'
}