r23071: print the command on failure only
authorStefan Metzmacher <metze@samba.org>
Tue, 22 May 2007 12:45:58 +0000 (12:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:52:48 +0000 (14:52 -0500)
metze

source/pidl/tests/Util.pm

index d4cdd72205d59e2fc227a77eaacef8f1e91cb93c..897e848440827e09932ab39b3753dd4d7fc14670 100644 (file)
@@ -92,7 +92,6 @@ SKIP: {
 
        my $cmd = "$cc $cflags -x c - -o $outfile $flags $ldflags";
        $cmd =~ s/\n//g;
-print "cmd: $cmd\n";
        open CC, "|$cmd";
        print CC "#define uint_t unsigned int\n";
        print CC "#define _GNU_SOURCE\n";
@@ -120,6 +119,7 @@ print "cmd: $cmd\n";
        ok(-f $outfile, "($name) compile");
 
        my $ret = system($outfile, ()) >> 8;
+       print "# cmd: $cmd\n" if ($ret != 0);
        print "# return code: $ret\n" if ($ret != 0);
 
        ok($ret == 0, "($name) run");