"Fossies" - the Fresh Open Source Software Archive

Member "automake-1.16.3/t/parallel-tests-console-output.sh" (19 Nov 2020, 2150 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. See also the latest Fossies "Diffs" side-by-side code changes report for "parallel-tests-console-output.sh": 1.16.2_vs_1.16.3.

    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 # parallel-tests: some checks on console output about testsuite
   18 # progress.
   19 
   20 . test-init.sh
   21 
   22 cat >> configure.ac << 'END'
   23 AC_OUTPUT
   24 END
   25 
   26 cat > Makefile.am << 'END'
   27 XFAIL_TESTS = sub/xpass.test xfail.test error.test
   28 TESTS = $(XFAIL_TESTS) fail.test pass.test a/b/skip.test sub/error2.test
   29 pass.log: fail.log
   30 error.log: pass.log
   31 sub/xpass.log: error.log
   32 sub/error2.log: xfail.log
   33 a/b/skip.log: sub/error2.log
   34 END
   35 
   36 cat > exp <<'END'
   37 ERROR: error.test
   38 ERROR: sub/error2.test
   39 FAIL: fail.test
   40 PASS: pass.test
   41 SKIP: a/b/skip.test
   42 XFAIL: xfail.test
   43 XPASS: sub/xpass.test
   44 END
   45 
   46 mkdir sub a a/b
   47 
   48 cat > pass.test << 'END'
   49 #!/bin/sh
   50 exit 0
   51 END
   52 cp pass.test sub/xpass.test
   53 
   54 cat > fail.test << 'END'
   55 #!/bin/sh
   56 exit 1
   57 END
   58 
   59 cat > xfail.test << 'END'
   60 #!/bin/sh
   61 # The sleep should ensure expected execution order of tests
   62 # even when make is run in parallel mode.
   63 # Creative quoting below to plase maintainer-check.
   64 sleep '10'
   65 exit 1
   66 END
   67 
   68 cat > error.test << 'END'
   69 #!/bin/sh
   70 exit 99
   71 END
   72 cp error.test sub/error2.test
   73 
   74 cat > a/b/skip.test << 'END'
   75 #!/bin/sh
   76 exit 77
   77 END
   78 
   79 chmod a+x pass.test fail.test xfail.test sub/xpass.test \
   80           a/b/skip.test error.test sub/error2.test
   81 
   82 $ACLOCAL
   83 $AUTOCONF
   84 $AUTOMAKE -a
   85 
   86 for vpath in : false; do
   87   if $vpath; then
   88     mkdir build
   89     cd build
   90     srcdir=..
   91   else
   92     srcdir=.
   93   fi
   94   $srcdir/configure
   95   run_make -O -e FAIL check
   96   LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | sort > got
   97   cat got
   98   diff $srcdir/exp got
   99   cd $srcdir
  100 done
  101 
  102 :