Re: [PHP-DEV] Re: [PATCH] run-tests.php
Melvyn Sopacua [EMAIL PROTECTED] wrote: At 19:02 1-11-2002, John Coggeshall wrote: I haven't looked at the patch in great detail, can someone forward me The commitlog? It hasn't been committed yet, as we agreed that only persons in 'Authors' should do that and agree, otherwise it'll be a mess. May I kindly ask that someone commits the patch, please? An option to send the test results manually, without trying to upload it, would be really useful. E.g. at my working place the machines are not directly connected to the Internet, and repeatedly banging against the firewall might be seen a bit annoying by the admins. And in some environments (e.g. on the HP/Compaq test drives), mail_qa_team() posts to nowhere land and nevertheless reports success. The patch is also not very large, and I've seen no real objections against including it. Regards... Michael -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PATCH] run-tests.php
On Fri, 1 Nov 2002, Melvyn Sopacua wrote: Hi, attached a patch: 1) To get the right compiler version (see php-qa thread on this) 2) Add option to save results, by Michael Mauch [EMAIL PROTECTED] Any objections? We can't object if there is no attachment :) Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions http://www.jdimedia.nl/ --- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PATCH] run-tests.php
At 15:37 1-11-2002, Derick Rethans wrote: Any objections? We can't object if there is no attachment :) ?php while($i100) { echo substr('#*!$%', mt_rand(1,6), 1); $i++; } ? With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? 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 - 1.104 +++ run-tests.php 1 Nov 2002 14:17:00 - -280,10 +280,12 /* We got failed Tests, offer the user to send and e-mail to QA team, unless NO_INTERACTION is set */ if ($sum_results['FAILED'] !getenv('NO_INTERACTION')) { $fp = fopen(php://stdin, r+); - echo Some tests have failed, would you like to send the\nreport to PHP's QA team? [Yn]: ; + echo Some tests have failed, would you like to send the\nreport to PHP's QA +team\n; + echo (choose \s\ to just save the results to a file)? [Yns]: ; $user_input = fgets($fp, 10); + $just_save_results = (strtolower($user_input[0]) == 's'); - if (strlen(trim($user_input)) == 0 || strtolower($user_input[0]) == 'y') { + if ($just_save_results || strlen(trim($user_input)) == 0 || +strtolower($user_input[0]) == 'y') { /* * Collect information about the host system for our report * Fetch phpinfo() output so that we can see the PHP enviroment -300,7 +302,16 $automake = shell_exec('automake --version'); $autoconf = shell_exec('autoconf --version'); $libtool = shell_exec('libtool --version'); - $compiler = shell_exec(getenv('CC').' -v 21'); + /* 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 21, +$cc_status); + if($cc_status == 0) { + $compiler = shell_exec(getenv('CC'). $flag +21); + break; + } + } } $failed_tests_data .= Automake:\n$automake\n; $failed_tests_data .= Autoconf:\n$autoconf\n; -323,13 +334,15 $compression = 0; - if (!mail_qa_team($failed_tests_data, $compression)) { + if ($just_save_results || !mail_qa_team($failed_tests_data, +$compression)) { $output_file = 'php_test_results_' . date('Ymd') . ( $compression ? '.txt.gz' : '.txt' ); $fp = fopen($output_file, w); fwrite($fp, $failed_tests_data); fclose($fp); - echo \nThe test script was unable to automatically send the report to PHP's QA Team\nPlease send .$output_file. to .PHP_QA_EMAIL. manually, thank you.\n; + if (!$just_save_results) + echo \nThe test script was unable to automatically send +the report to PHP's QA Team\n; + echo Please send .$output_file. to .PHP_QA_EMAIL. +manually, thank you.\n; } else { fwrite($fp, \nThank you for helping to make PHP better.\n); fclose($fp); -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
The only thing I see wrong, is perhaps that Shane and I are working on a new run-tests script (see run-tests2.php) Since the script (at least the CLI class) basically works just as well as the current run-tests.php (as far as I've seen thus far)... Well, I'm just worried your patch will end up disappearing :( All IMHO of course. John |-Original Message- |From: Melvyn Sopacua [mailto:msopacua;php.net] |Sent: Friday, November 01, 2002 10:05 AM |To: Derick Rethans |Cc: Php Dev List; Ilia Alshanetsky; Preston L.Bannister; |Marcus Boerger; Sander Roobol |Subject: [PHP-DEV] Re: [PATCH] run-tests.php | | |At 15:37 1-11-2002, Derick Rethans wrote: | | Any objections? | |We can't object if there is no attachment :) | |?php while($i100) { echo substr('#*!$%', mt_rand(1,6), 1); |$i++; } ? | | |With kind regards, | |Melvyn Sopacua |?php include(not_reflecting_employers_views.txt); ? | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PATCH] run-tests.php
On November 1, 2002 10:05 am, Melvyn Sopacua wrote: At 15:37 1-11-2002, Derick Rethans wrote: Any objections? We can't object if there is no attachment :) ?php while($i100) { echo substr('#*!$%', mt_rand(1,6), 1); $i++; } ? With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? Looks fine to me, +1. Ilia -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
Ouch, I really thought you we're working on 'run-tests2.php - the web edition'. Currently there's still a number of issues being worked on, with the current CLI interface, so your fork of that version, may be premature, or you should consider working on run-tests.php for the web, without breaking it. Unless all the authors and QA team agree that the current CLI version, is 'production-ready', but given recent discussions on php-qa, I doubt that :). Another option would be, to keep run-tests2.php in there and after 4.3.0-release merge the changes? At 17:39 1-11-2002, John Coggeshall wrote: The only thing I see wrong, is perhaps that Shane and I are working on a new run-tests script (see run-tests2.php) Since the script (at least the CLI class) basically works just as well as the current run-tests.php (as far as I've seen thus far)... Well, I'm just worried your patch will end up disappearing :( All IMHO of course. John |-Original Message- |From: Melvyn Sopacua [mailto:msopacua;php.net] |Sent: Friday, November 01, 2002 10:05 AM |To: Derick Rethans |Cc: Php Dev List; Ilia Alshanetsky; Preston L.Bannister; |Marcus Boerger; Sander Roobol |Subject: [PHP-DEV] Re: [PATCH] run-tests.php | | |At 15:37 1-11-2002, Derick Rethans wrote: | | Any objections? | |We can't object if there is no attachment :) | |?php while($i100) { echo substr('#*!$%', mt_rand(1,6), 1); |$i++; } ? | | |With kind regards, | |Melvyn Sopacua |?php include(not_reflecting_employers_views.txt); ? | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
Wait wait wait.. I think I've been misunderstood... I'm not talking about the version 4.3 release, and yes we are working on the web edition of the test script.. However, Shane (rightly so, IMHO) re-wrote run-tests (now run-tests2) and made it a class (testHarness) from which to base the web-based testing from... I've made a few changes to it (to make life easier for everyone involved) and extended that class to make the web-based version. The idea here is (at least my understanding of the idea) that run-tests2 would get production-ready (NOT for 4.3) and then replace run-tests.php (Shane, please slap me upside the head if I'm wrong here in what I thought the idea was)... As far as I'm concerned, run-tests2.php doesn't need to be in any 4.3 release (since I know the web based stuff isn't stable yet)... Am I making sense here? John |-Original Message- |From: Melvyn Sopacua [mailto:msopacua;php.net] |Sent: Friday, November 01, 2002 12:14 PM |To: [EMAIL PROTECTED] |Cc: 'Php Dev List' |Subject: RE: [PHP-DEV] Re: [PATCH] run-tests.php | | |Ouch, | |I really thought you we're working on 'run-tests2.php - the |web edition'. | |Currently there's still a number of issues being worked on, |with the current CLI interface, so your fork of that version, |may be premature, or you should consider working on |run-tests.php for the web, without breaking it. | |Unless all the authors and QA team agree that the current CLI |version, is 'production-ready', but given recent discussions |on php-qa, I doubt that :). | |Another option would be, to keep run-tests2.php in there and |after 4.3.0-release merge the changes? | |At 17:39 1-11-2002, John Coggeshall wrote: | | |The only thing I see wrong, is perhaps that Shane and I are |working on |a new run-tests script (see run-tests2.php) | |Since the script (at least the CLI class) basically works |just as well |as the current run-tests.php (as far as I've seen thus far)... Well, |I'm just worried your patch will end up disappearing :( | |All IMHO of course. | |John | | ||-Original Message- ||From: Melvyn Sopacua [mailto:msopacua;php.net] ||Sent: Friday, November 01, 2002 10:05 AM ||To: Derick Rethans ||Cc: Php Dev List; Ilia Alshanetsky; Preston L.Bannister; Marcus ||Boerger; Sander Roobol ||Subject: [PHP-DEV] Re: [PATCH] run-tests.php || || ||At 15:37 1-11-2002, Derick Rethans wrote: || || Any objections? || ||We can't object if there is no attachment :) || ||?php while($i100) { echo substr('@#*!$%', mt_rand(1,6), |1); $i++; } ||? || || ||With kind regards, || ||Melvyn Sopacua ||?php include(not_reflecting_employers_views.txt); ? || | | |-- |PHP Development Mailing List http://www.php.net/ |To unsubscribe, visit: http://www.php.net/unsub.php | |With kind regards, | |Melvyn Sopacua |?php include(not_reflecting_employers_views.txt); ? | | |-- |PHP Development Mailing List http://www.php.net/ |To unsubscribe, visit: http://www.php.net/unsub.php | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
At 18:23 1-11-2002, John Coggeshall wrote: Wait wait wait.. sleep(3); I think I've been misunderstood... I'm not talking about the version 4.3 release, and yes we are working on the web edition of the test script.. However, Shane (rightly so, IMHO) re-wrote run-tests (now run-tests2) and made it a class (testHarness) from which to base the web-based testing from... I've made a few changes to it (to make life easier for everyone involved) and extended that class to make the web-based version. The idea here is (at least my understanding of the idea) that run-tests2 would get production-ready (NOT for 4.3) and then replace run-tests.php (Shane, please slap me upside the head if I'm wrong here in what I thought the idea was)... Ok - so unless Shane disagrees and gets physical, run-tests.php should be in 4.3 and will have a totally different code-base than the version for php 4.4/5.0. The problem with that is, that you guys can't keep up with code changes, but only feature changes. The features addressed in the patch, are IMO important though. As far as I'm concerned, run-tests2.php doesn't need to be in any 4.3 release (since I know the web based stuff isn't stable yet)... Am I making sense here? Yep. So the real question is: how can people who commit on run-tests.php make life easier for you, so that you can keep up with feature changes? With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PATCH] run-tests.php
On November 1, 2002 12:23 pm, John Coggeshall wrote: Wait wait wait.. I think I've been misunderstood... I'm not talking about the version 4.3 release, and yes we are working on the web edition of the test script.. However, Shane (rightly so, IMHO) re-wrote run-tests (now run-tests2) and made it a class (testHarness) from which to base the web-based testing from... What made you decide to go for the OO model of the run-tests script, there does not seem to be any advantage in adding this overhead (imho)? Ilia -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PATCH] run-tests.php
At 18:44 01.11.2002, Ilia A. wrote: On November 1, 2002 12:23 pm, John Coggeshall wrote: Wait wait wait.. I think I've been misunderstood... I'm not talking about the version 4.3 release, and yes we are working on the web edition of the test script.. However, Shane (rightly so, IMHO) re-wrote run-tests (now run-tests2) and made it a class (testHarness) from which to base the web-based testing from... What made you decide to go for the OO model of the run-tests script, there does not seem to be any advantage in adding this overhead (imho)? More important is that there are differences in ZE1 ZE2 but besides those problems i think this makes handling of different sapis easier. marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
|Ok - so unless Shane disagrees and gets physical, |run-tests.php should be in 4.3 and will have a totally |different code-base than the version for php 4.4/5.0. Exactly. |The features addressed in the patch, are IMO important though. I haven't looked at the patch in great detail, can someone forward me The commitlog? |Yep. |So the real question is: how can people who commit on |run-tests.php make life easier for you, so that you can keep |up with feature changes? Well, I think perhaps the best bet is to make sure we keep good communication Open on any work done in run-tests, so that run-tests2 keeps up with the pace.. Cheers, John s | |With kind regards, | |Melvyn Sopacua |?php include(not_reflecting_employers_views.txt); ? | | |-- |PHP Development Mailing List http://www.php.net/ |To unsubscribe, visit: http://www.php.net/unsub.php | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
|What made you decide to go for the OO model of the run-tests |script, there |does not seem to be any advantage in adding this overhead (imho)? There is most definitely an advantage. Using the OO model, we essentially created A test engine which had some default output code (direct to stdout) and ran all of The desired tests... It basically runs just like the current run-tests.php script (maybe Not as many pretty colors, etc). The reason the OO is cool though, is when we want to port that test script into another Medium or output it in a different format such as HTML. I just created a new object which Extended the base class and overload some of the functions (such as showstatus() which is Called every time a test passes/fails) to generate HTML output instead of text.. It's not done yet, but the plan I have here is to actually abstract run_tests() a step Further into run_test() and execute_test(), where execute_test() can be overloaded by Another class as well (to change the way a particlar test is executed seamlessly -- i.e. Via a HTTP request instead of a CLI command)... Making sense? John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
At 19:02 1-11-2002, John Coggeshall wrote: I haven't looked at the patch in great detail, can someone forward me The commitlog? It hasn't been committed yet, as we agreed that only persons in 'Authors' should do that and agree, otherwise it'll be a mess. |Yep. |So the real question is: how can people who commit on |run-tests.php make life easier for you, so that you can keep |up with feature changes? Well, I think perhaps the best bet is to make sure we keep good communication Open on any work done in run-tests, so that run-tests2 keeps up with the pace.. Solid log messages and subscribing to php-cvs should be very usefull then :) With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PATCH] run-tests.php
Ok - so unless Shane disagrees and gets physical, /me jumps around screaming after hiking up a large mountain carrying 2 40lb. boulders...physical enough? :) run-tests.php should be in 4.3 and will have a totally different code-base than the version for php 4.4/5.0. I don't expect we'll be done with the new test stuff in time for 4.3unless 4.3 takes *way too long* to get out. My personal goal with this is to have at least some kind of automated thread based testing for 5, and some way to test through sapi modules. The problem with that is, that you guys can't keep up with code changes, but only feature changes. The features addressed in the patch, are IMO important though. I'm more concerned about getting the architecture of the test system flexible enough to have different test modes (as John has described on this thread). If the layout is right, features should not be hard to backport into the new stuff. But we can also try to keep up with the new features as we go along to lessen any issues that may arise. Shane -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PATCH] run-tests.php
On November 1, 2002 01:08 pm, John Coggeshall wrote: |What made you decide to go for the OO model of the run-tests |script, there |does not seem to be any advantage in adding this overhead (imho)? There is most definitely an advantage. Using the OO model, we essentially created A test engine which had some default output code (direct to stdout) and ran all of The desired tests... It basically runs just like the current run-tests.php script (maybe Not as many pretty colors, etc). The reason the OO is cool though, is when we want to port that test script into another Medium or output it in a different format such as HTML. I just created a new object which Extended the base class and overload some of the functions (such as showstatus() which is Called every time a test passes/fails) to generate HTML output instead of text.. In the most basic form testing process consists of 4 parts. Executing the script, parsing output, comparing the output to the expected output and comparing the results. Ideally (imho) the process would look something like this pseudo code: function execute_test(test, MODE) { $test_data = init_test(test); $result = run_test(test_script, MODE); $test_output = fetch_test_output($result, MODE); $bool_status = compare_output($test_output, $test_data['expected_output']); return_output($bool_status, $test_data, $test_output, MODE); } The MODE would indicate the mode of operation (cli/cgi/webserver and so on), each step where the MODE is relevant would then have a switch to determine which function should be executed at this point. So, if MODE is cli, we'd run cli_run_test() and similarly if the MODE is web, we'd run web_run_test(). This would make a simpler test, which would not need to rely on more advanced features like OO, which may change in their functionality once ZE2 comes around, as Marcus had pointed out. Since at this point we could have people running both ZE1 and ZE2 use the test, I think relying on OO is dangerous. My reasoning is that considering the simplicity of the testing 'engine', we do not need to add the OO layer of obfuscation. Now, I am not a big fan of OO, so my opinion on the matter maybe somewhat skewed in that regard, non Ilia -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PATCH] run-tests.php
On Fri, 1 Nov 2002, Melvyn Sopacua wrote: At 15:37 1-11-2002, Derick Rethans wrote: Any objections? We can't object if there is no attachment :) ?php while($i100) { echo substr('#*!$%', mt_rand(1,6), 1); $i++; } ? Looks fine to me. Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PATCH] run-tests.php
On Fri, 1 Nov 2002, John Coggeshall wrote: The only thing I see wrong, is perhaps that Shane and I are working on a new run-tests script (see run-tests2.php) Since the script (at least the CLI class) basically works just as well as the current run-tests.php (as far as I've seen thus far)... Well, I'm just worried your patch will end up disappearing :( IMO the new script should not be used to QA PHP 4.x, but it should be replace it when we're heading for 5. It's really getting a bitch to make sure the testscript stays stable anyway. Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PATCH] run-tests.php
This would make a simpler test, which would not need to rely on more advanced features like OO, which may change in their functionality once ZE2 comes around, as Marcus had pointed out. Since at this point we could have people running both ZE1 and ZE2 use the test, I think relying on OO is dangerous. My reasoning is that considering the simplicity of the testing 'engine', we do not need to add the OO layer of obfuscation. Now, I am not a big fan of OO, so my opinion on the matter maybe somewhat skewed in that regard, non Ilia The basics of php OO, which is all that will get used, doesn't change enough between ze1 and ze2 to warrent any worry about it. If it does become an issue then we'll deal with it, but I find that highly unlikely. Shane -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php