Re: Re: Test results
| From: | Melvyn Sopacua | Date: | Fri, 01 Nov 2002 13:19:08 +0000 |
| Subject: | Re: Re: Test results | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-6543@lists.php.net to get a copy of this message | ||
At 13:36 1-11-2002, Michael Mauch wrote:
>Michael Mauch <michael.mauch@gmx.de> wrote:
> > OS:
> > OSF1
>[...]
> > Compiler:
> > cc: Error: No source or object files specified on the command line
Could you try attached patch on run-tests.php ?
Met vriendelijke groeten / With kind regards,
Webmaster IDG.nl
Melvyn Sopacua
Index: run-tests.php =================================================================== RCS file: /repository/php4/run-tests.php,v retrieving revision 1.104 diff -u -r1.104 run-tests.php --- run-tests.php 31 Oct 2002 14:01:58 -0000 1.104 +++ run-tests.php 1 Nov 2002 13:11:47 -0000 @@ -300,7 +300,16 @@ $automake = shell_exec('automake --version'); $autoconf = shell_exec('autoconf --version'); $libtool = shell_exec('libtool --version'); - $compiler = shell_exec(getenv('CC').' -v 2>&1'); + /* Try the most common flags for 'version' */ + $flags = array('-v', '-V', '--version'); + $cc_status=0; + foreach($flags AS $flag) { + system(getenv('CC')." $flag >/dev/null 2>&1", $cc_status); + if($cc_status == 0) { + $compiler = shell_exec(getenv('CC')." $flag 2>&1"); + break; + } + } } $failed_tests_data .= "Automake:\n$automake\n"; $failed_tests_data .= "Autoconf:\n$autoconf\n";
Index: run-tests.php =================================================================== RCS file: /repository/php4/run-tests.php,v retrieving revision 1.104 diff -u -r1.104 run-tests.php --- run-tests.php 31 Oct 2002 14:01:58 -0000 1.104 +++ run-tests.php 1 Nov 2002 13:11:47 -0000 @@ -300,7 +300,16 @@ $automake = shell_exec('automake --version'); $autoconf = shell_exec('autoconf --version'); $libtool = shell_exec('libtool --version'); - $compiler = shell_exec(getenv('CC').' -v 2>&1'); + /* Try the most common flags for 'version' */ + $flags = array('-v', '-V', '--version'); + $cc_status=0; + foreach($flags AS $flag) { + system(getenv('CC')." $flag >/dev/null 2>&1", $cc_status); + if($cc_status == 0) { + $compiler = shell_exec(getenv('CC')." $flag 2>&1"); + break; + } + } } $failed_tests_data .= "Automake:\n$automake\n"; $failed_tests_data .= "Autoconf:\n$autoconf\n";