VirtualBox

source: kBuild/vendor/grep/3.7/gnulib-tests/test-verify.sh

Last change on this file was 3529, checked in by bird, 3 years ago

Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.

  • Property svn:executable set to *
File size: 725 bytes
Line 
1#!/bin/sh
2. "${srcdir=.}/init.sh"
3
4# We are not interested in triggering bugs in the compilers and tools
5# (such as gcc 4.3.1 on openSUSE 11.0).
6unset MALLOC_PERTURB_
7
8# Rather than figure out how to invoke the compiler with the right
9# include path ourselves, we let make do it:
10(cd "$initial_cwd_" \
11 && rm -f test-verify-try.o \
12 && $MAKE test-verify-try.o >/dev/null 2>&1) \
13 || skip_ "cannot compile error-free"
14
15# Now, prove that we encounter all expected compilation failures:
16: >out
17: >err
18for i in 1 2 3 4 5; do
19 (cd "$initial_cwd_"
20 rm -f test-verify-try.o
21 $MAKE CFLAGS=-DEXP_FAIL=$i test-verify-try.o) >>out 2>>err \
22 && { warn_ "compiler didn't detect verification failure $i"; fail=1; }
23done
24
25Exit $fail
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette