Imported Upstream version 4.4
[platform/upstream/make.git] / tests / scripts / misc / fopen-fail
1 #                                                                    -*-perl-*-
2
3 $description = "Make sure make exits with an error if fopen fails.";
4
5 # For some reason on Cygwin, make exits with no error message after
6 # it recurses for a while.
7 $^O =~ /cygwin/ and return -1;
8
9 # Recurse infinitely until we run out of open files, and ensure we
10 # fail with a non-zero exit code.  Don't bother to test the output
11 # since it's hard to know what it will be, exactly.
12 # See Savannah bug #27374.
13
14 # Use a longer-than-normal timeout: some systems have more FDs available?
15 # We also set ulimit -n 512 in check-regression in Makefile.am, which see.
16 # See Savannah bug #42390.
17 run_make_test(q!
18 include $(lastword $(MAKEFILE_LIST))
19 !,
20               '', undef, 512, 300);
21
22 1;