summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-09-27 21:00:15 +0000
committerJosh Hoyt <josh@janrain.com>2006-09-27 21:00:15 +0000
commit78248d8c2947869686da927de5aa76179cbb37de (patch)
tree590406b1220486b536250554716efc7fa5d4cd19
parent64ac71ce1dec61cf5e8dd2f0945361a830a48452 (diff)
downloadphp-openid-78248d8c2947869686da927de5aa76179cbb37de.zip
php-openid-78248d8c2947869686da927de5aa76179cbb37de.tar.gz
php-openid-78248d8c2947869686da927de5aa76179cbb37de.tar.bz2
[project @ Add flag to run tests with insecure randomness source and make test suite use it for cygwin]
-rw-r--r--admin/runtests6
-rw-r--r--admin/texttest.php6
2 files changed, 11 insertions, 1 deletions
diff --git a/admin/runtests b/admin/runtests
index 9026a90..770c5fb 100644
--- a/admin/runtests
+++ b/admin/runtests
@@ -31,7 +31,11 @@ test_docblocks () {
}
test_php () {
- /usr/bin/env php "$HERE/texttest.php"
+ if uname -a | grep -i cygwin >/dev/null 2>/dev/null ; then
+ /usr/bin/env php "$(dirname "$0")/texttest.php" --insecure-rand
+ else
+ /usr/bin/env php "$HERE/texttest.php"
+ fi
}
tests="tabs longlines nobadbraces nobadcase opentag docblocks php import"
diff --git a/admin/texttest.php b/admin/texttest.php
index 0f7d1ad..12b26ea 100644
--- a/admin/texttest.php
+++ b/admin/texttest.php
@@ -43,6 +43,12 @@ function microtime_float()
// Drop $argv[0] (command name)
array_shift($argv);
+// Randomness source selection
+$t = array_search('--insecure-rand', $argv);
+if ($t !== false && $t !== null) {
+ define('Auth_OpenID_RAND_SOURCE', null);
+}
+
// ******** Math library selection ***********
$t = array_search('--no-math', $argv);