summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <dag@janrain.com>2008-06-02 20:08:43 +0000
committertailor <dag@janrain.com>2008-06-02 20:08:43 +0000
commit577b95578ba7283d1569932a1024783203542e5b (patch)
treef2f0bde8ac2d4bbcc096773146750f05a1b69703
parent315bb5a63097aec119fdb587279f27465063515c (diff)
downloadphp-openid-577b95578ba7283d1569932a1024783203542e5b.zip
php-openid-577b95578ba7283d1569932a1024783203542e5b.tar.gz
php-openid-577b95578ba7283d1569932a1024783203542e5b.tar.bz2
[project @ Add --extra-tests option to texttest.php]
-rw-r--r--admin/texttest.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/admin/texttest.php b/admin/texttest.php
index fecd6d5..b1c0a3c 100644
--- a/admin/texttest.php
+++ b/admin/texttest.php
@@ -46,7 +46,8 @@ $longopts = array('no-math',
'no-curl',
'math-lib=',
'insecure-rand',
- 'thorough');
+ 'thorough',
+ 'extra-tests=');
$con = new Console_Getopt;
$args = $con->readPHPArgv();
@@ -61,6 +62,7 @@ if (PEAR::isError($options)) {
list($flags, $tests_to_run) = $options;
$math_type = array();
+$extra_test_modules = array();
$thorough = false;
foreach ($flags as $flag) {
list($option, $value) = $flag;
@@ -80,6 +82,9 @@ foreach ($flags as $flag) {
case '--thorough':
define('Tests_Auth_OpenID_thorough', true);
break;
+ case '--extra-tests':
+ $extra_test_modules[] = $value;
+ break;
default:
print "Unrecognized option: $option\n";
exit(1);
@@ -118,7 +123,18 @@ if ($math_type && false) {
// ******** End math library selection **********
-$suites = loadSuite($args);
+$suites = loadSuite($tests_to_run);
+
+// ******** Load additional test suites ********
+foreach ($extra_test_modules as $filename) {
+ if (!global_require_once($filename)) {
+ continue;
+ }
+ $module_name = basename($filename, '.php');
+ $class_name = "Tests_Auth_OpenID_${module_name}_Test";
+ $suites[] = makeSuite($class_name);
+}
+
$totals = array(
'run' => 0,