From 43cd836d43a5df257675393052e42751cca2e0de Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 22 May 2015 08:34:43 +0200 Subject: php-pecl-http: also run online tests during local build (not mock) --- php-pecl-http.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/php-pecl-http.spec b/php-pecl-http.spec index f96c2f3..fc90050 100644 --- a/php-pecl-http.spec +++ b/php-pecl-http.spec @@ -258,6 +258,14 @@ export REPORT_EXIT_STATUS=0 %else export REPORT_EXIT_STATUS=1 %endif +user=$(id -un) +: all tests when rpmbuild is used +if [ "$user" = "remi" ]; then +export SKIP_ONLINE_TESTS=0 +else +: only local tests when mock is used +export SKIP_ONLINE_TESTS=1 +fi # Shared needed extensions modules="" @@ -276,7 +284,6 @@ done %if %{with_tests} : Upstream test suite NTS extension cd NTS -SKIP_ONLINE_TESTS=1 \ TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ @@ -293,7 +300,6 @@ NO_INTERACTION=1 \ %if %{with_tests} : Upstream test suite ZTS extension cd ../ZTS -SKIP_ONLINE_TESTS=1 \ TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ -- cgit