packages: php-predis/run-tests.sh, php-predis/tests.patch - randomize test ...

glen glen at pld-linux.org
Thu Oct 20 20:12:01 CEST 2011


Author: glen                         Date: Thu Oct 20 18:12:01 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- randomize test port

---- Files affected:
packages/php-predis:
   run-tests.sh (1.1 -> 1.2) , tests.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/php-predis/run-tests.sh
diff -u packages/php-predis/run-tests.sh:1.1 packages/php-predis/run-tests.sh:1.2
--- packages/php-predis/run-tests.sh:1.1	Sat Oct  9 17:07:14 2010
+++ packages/php-predis/run-tests.sh	Thu Oct 20 20:11:56 2011
@@ -1,13 +1,16 @@
 #!/bin/sh
 # start redis daemon, and run tests, kill the daemon when tests are ran
 # Author: Elan Ruusamäe <glen at delfi.ee>
+# $Id$
 
-cat > redis.conf <<'EOF'
+export REDIS_SERVER_PORT=6380
+
+cat > redis.conf <<EOF
 bind 127.0.0.1
 
 daemonize no
 #pidfile redis.pid
-port 6380
+port $REDIS_SERVER_PORT
 bind 127.0.0.1
 timeout 300
 loglevel warning

================================================================
Index: packages/php-predis/tests.patch
diff -u packages/php-predis/tests.patch:1.2 packages/php-predis/tests.patch:1.3
--- packages/php-predis/tests.patch:1.2	Thu Oct 20 11:54:53 2011
+++ packages/php-predis/tests.patch	Thu Oct 20 20:11:56 2011
@@ -1,5 +1,5 @@
---- php-predis-0.6.6/test/PredisShared.php~	2011-10-20 12:45:42.000000000 +0300
-+++ php-predis-0.6.6/test/PredisShared.php	2011-10-20 12:46:47.993123318 +0300
+--- php-predis-0.6.6/test/PredisShared.php~	2011-04-01 21:36:41.000000000 +0300
++++ php-predis-0.6.6/test/PredisShared.php	2011-10-20 21:06:27.088554381 +0300
 @@ -1,7 +1,7 @@
  <?php
  // -------------------------------------------------------------------------- //
@@ -9,12 +9,16 @@
  
  // -------------------------------------------------------------------------- //
  
-@@ -17,7 +17,7 @@
+@@ -26,9 +26,11 @@
+     return create_function($param, $function);
+ }
  
++define('REDIS_SERVER_PORT', getenv('REDIS_SERVER_PORT'));
++
  class RC {
      const SERVER_HOST      = '127.0.0.1';
 -    const SERVER_PORT      = 6379;
-+    const SERVER_PORT      = 6380; // non-standard port, so shouldn't destroy
++    const SERVER_PORT      = REDIS_SERVER_PORT;
      const DEFAULT_DATABASE = 15;
  
      const WIPE_OUT         = 1;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php-predis/run-tests.sh?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php-predis/tests.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list