3 $description = "Test ignored failures in recipe command lines";
13 "one", "exit 1\n#MAKE#: [#MAKEFILE#:3: one] Error 1 (ignored)\nexit 0\n");
18 run_make_test(undef, " -i two",
19 "exit 1\n#MAKE#: [#MAKEFILE#:6: two] Error 1 (ignored)\nexit 0\n");
24 # Test that error line offset works
32 '', "hi\nthere\n#MAKE#: *** [#MAKEFILE#:5: all] Error 1", 512);
34 # Windows error look completely different :-/
38 my ($cmd, $args) = @_;
39 if ($port_type eq 'W32') {
40 return (2, "process_begin: CreateProcess(NULL, $cmd $args, ...) failed.\nmake (e=2): The system cannot find the file specified.");
43 return (127, "#MAKE#: $cmd: $ERR_no_such_file");
49 # Try failing due to unknown command
50 my $unk = './foobarbazbozblat';
53 my ($ernum, $erstr) = errors_getinfo($unk, "xx yy");
57 "$unk xx yy\n$erstr\n#MAKE#: [#MAKEFILE#:2: one] Error $ernum (ignored)\n");
62 ($ernum, $erstr) = errors_getinfo($unk, "aa bb");
66 "$unk aa bb\n$erstr\n#MAKE#: [#MAKEFILE#:2: two] Error $ernum (ignored)\n");
71 run_make_test(undef, 'two',
72 "$unk aa bb\n$erstr\n#MAKE#: *** [#MAKEFILE#:2: two] Error $ernum\n", 512);
74 # SV #56918 : Test the unknown command as the second recipe line
76 ($ernum, $erstr) = errors_getinfo($unk, "qq rr");
82 "one\n$unk qq rr\n$erstr\n#MAKE#: *** [#MAKEFILE#:4: three] Error $ernum\n", 512);
84 # Try failing due to non-executable file
86 if ($ERR_nonexe_file) {
87 my $noexe = './barfooblatboz';
94 'one', "$noexe xx yy\n#MAKE#: $noexe: $ERR_nonexe_file\n#MAKE#: [#MAKEFILE#:2: one] Error 127 (ignored)\n");
99 # Try failing by "running" a directory
102 mkdir('sd', 0775) or print "mkdir: sd: $!\n";
108 '', "sd\n#MAKE#: sd: $ERR_exe_dir\n#MAKE#: *** [#MAKEFILE#:3: all] Error 127", 512);
113 '', "./sd\n#MAKE#: ./sd: $ERR_exe_dir\n#MAKE#: *** [#MAKEFILE#:2: all] Error 127", 512);