"Fossies" - the Fresh Open Source Software Archive

Member "automake-1.16.3/t/testsuite-summary-header.sh" (19 Nov 2020, 2057 Bytes) of package /linux/misc/automake-1.16.3.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #! /bin/sh
    2 # Copyright (C) 2011-2020 Free Software Foundation, Inc.
    3 #
    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)
    7 # any later version.
    8 #
    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.
   13 #
   14 # You should have received a copy of the GNU General Public License
   15 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
   16 
   17 # Check that we can override the "Testsuite summary" header line,
   18 # per bug#11745.
   19 
   20 . test-lib.sh
   21 
   22 use_colors=no; use_vpath=no
   23 . testsuite-summary-checks.sh
   24 
   25 ./configure
   26 
   27 # Cut down from do_check in ax/testsuite-summary-checks.sh
   28 # so that we can pass a make variable setting in $1.
   29 #
   30 do_header_check ()
   31 {
   32   cat > summary.exp
   33   run_make -O -e IGNORE check "$1"
   34   test $am_make_rc -eq 0 || exit 1
   35   $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \
   36    || fatal_ "cannot extract testsuite summary"
   37   cat summary.exp
   38   cat summary.got
   39   compare=diff
   40   $compare summary.exp summary.got || exit 1
   41 }
   42 
   43 # We don't actually run any tests, only interested in the header line.
   44 results="\
   45 # TOTAL: 0
   46 # PASS:  0
   47 # SKIP:  0
   48 # XFAIL: 0
   49 # FAIL:  0
   50 # XPASS: 0
   51 # ERROR: 0"
   52 #
   53 success_footer=${br}
   54 
   55 # Check the default.
   56 header="\
   57 ${br}
   58 Testsuite summary for GNU AutoFoo 7.1
   59 ${br}"
   60 #
   61 do_header_check 'junkvar=junkval' <<END
   62 $header
   63 $results
   64 $success_footer
   65 END
   66 
   67 # Elide the "for $(PACKAGE_STRING)".
   68 header_min="\
   69 ${br}
   70 Testsuite summary
   71 ${br}"
   72 #
   73 do_header_check 'AM_TESTSUITE_SUMMARY_HEADER=""' <<END
   74 $header_min
   75 $results
   76 $success_footer
   77 END
   78 
   79 # Add a suffix.
   80 header_more="\
   81 ${br}
   82 Testsuite summary for GNU AutoFoo 7.1 (hi)
   83 ${br}"
   84 #
   85 do_header_check 'AM_TESTSUITE_SUMMARY_HEADER=" for $(PACKAGE_STRING) (hi)"' <<END
   86 $header_more
   87 $results
   88 $success_footer
   89 END
   90 
   91 :