2 # Copyright (C) 2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Check performanceof recipe generating test-suite.log file and testsuite
18 # summary. That has suffered of huge inefficiencies in the past.
19 # FIXME: this test is not currently able to detect whether the measured
20 # FIXME: performance is too low, and FAIL accordingly; it just offers
21 # FIXME: an easy way verify how effective a performance optimization is.
27 echo AC_OUTPUT >> configure.ac
29 cat > Makefile.am <<'END'
31 ## Will be updated later.
33 ## None of these should ever be run.
34 T_LOG_COMPILER = false
38 # Temporarily disable shell traces, to avoid bloating the log file.
41 for i in $(seq_ 1 $count); do
43 echo dummy $i > $i.log
44 echo :global-test-result: PASS > $i.trs
45 echo :test-result: PASS >> $i.trs
46 echo :copy-in-global-log: yes >> $i.trs
50 # Re-enable shell traces.
53 head -n 100 Makefile.am || : # For debugging.
54 tail -n 100 Makefile.am || : # Likewise.
55 cat $count.trs # Likewise, just the last specimen though.
57 # So that we don't need to create a ton of dummy tests.
58 #echo '$(TESTS):' >> Makefile.am
66 $MAKE test-suite.log >stdout || { cat stdout; exit 1; }
70 grep "^# TOTAL: $count$" stdout
71 grep "^dummy $count$" test-suite.log
72 specimen=347 # Could be any number <= $count.
73 grep "^dummy $specimen$" test-suite.log