diff --git a/t/porting/cpphdrcheck.t b/t/porting/cpphdrcheck.t index 04682f126f76..81801c49ed8e 100644 --- a/t/porting/cpphdrcheck.t +++ b/t/porting/cpphdrcheck.t @@ -216,7 +216,14 @@ sub ok_compile_only($job, $conf, $name) { local $Level = $Level + 1; my $result = _test_compile_only($job, $conf); - ok($result, $name); + if (ok($result->{ok}, $name)) { + note "cmd: $result->{cmd}"; + note "out: $result->{out}"; + } + else { + diag "cmd: $result->{cmd}"; + diag "out: $result->{out}"; + } } sub _test_compile_only ($job, $conf) { @@ -241,18 +248,22 @@ sub _test_compile_only ($job, $conf) { } my $cmd = "$conf->{ccpp} $opts $code 2>&1"; - note "running '$cmd'"; my $out = `$cmd`; chdir $cwd; unless ($? == 0) { - note "'$cmd' failed: $out"; - return; + return + +{ + cmd => $cmd, + out => $out, + }; } return +{ + ok => 1, + cmd => $cmd, out => $out, }; } @@ -336,7 +347,13 @@ sub get_source ($keyword) { } # the test code below tries to use at least one language feature -# specific to that version +# specific to that version. +# +# For now we don't try to do anything real with perl here, but that may change. +# +# The perl headers need to be after the C++ headers since the perl headers +# define many macros that could conflict with the public and non-public +# like "std::__impl::somenamehere" names that the C++ headers use or define __DATA__ -- cpp11 #include