From a8b4e40fa225f4f2524cc29c37119d00005ccca1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 25 Oct 2019 11:14:56 +0200 Subject: [PATCH] Simplify travis setup scripts Reduce duplication. --- .travis.yml | 8 +++----- travis/ext/curl/setup.sh | 5 ----- travis/ext/mysqli/setup.sh | 2 -- travis/ext/pdo_mysql/setup.sh | 2 -- travis/ext/pdo_pgsql/setup.sh | 2 -- travis/{ext/mysql/setup.sh => setup-mysql.sh} | 0 travis/{ext/pgsql/setup.sh => setup-pgsql.sh} | 0 7 files changed, 3 insertions(+), 16 deletions(-) delete mode 100755 travis/ext/curl/setup.sh delete mode 100755 travis/ext/mysqli/setup.sh delete mode 100755 travis/ext/pdo_mysql/setup.sh delete mode 100755 travis/ext/pdo_pgsql/setup.sh rename travis/{ext/mysql/setup.sh => setup-mysql.sh} (100%) rename travis/{ext/pgsql/setup.sh => setup-pgsql.sh} (100%) diff --git a/.travis.yml b/.travis.yml index d78b14e93d..cbc75370fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,6 +51,7 @@ env: - PDO_MYSQL_TEST_USER=travis - PDO_MYSQL_TEST_PASS= - PDO_MYSQL_TEST_HOST=127.0.0.1 + - PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=" - REPORT_EXIT_STATUS=1 matrix: - ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0 @@ -65,11 +66,8 @@ before_script: # Compile PHP - travis_wait ./travis/compile.sh # Setup Extensions - - . ./travis/ext/mysql/setup.sh - - . ./travis/ext/mysqli/setup.sh - - . ./travis/ext/pdo_mysql/setup.sh - - . ./travis/ext/pgsql/setup.sh - - . ./travis/ext/pdo_pgsql/setup.sh + - ./travis/setup-mysql.sh + - ./travis/setup-pgsql.sh # Run PHPs run-tests.php script: diff --git a/travis/ext/curl/setup.sh b/travis/ext/curl/setup.sh deleted file mode 100755 index 02e8ce5bb8..0000000000 --- a/travis/ext/curl/setup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -export PHP_CURL_HTTP_REMOTE_SERVER="http://localhost:8080" -cd ./ext/curl/tests/responder -php -S localhost:8080 & -cd - diff --git a/travis/ext/mysqli/setup.sh b/travis/ext/mysqli/setup.sh deleted file mode 100755 index a3ba75cb2d..0000000000 --- a/travis/ext/mysqli/setup.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -mysql -e "CREATE DATABASE IF NOT EXISTS test" diff --git a/travis/ext/pdo_mysql/setup.sh b/travis/ext/pdo_mysql/setup.sh deleted file mode 100755 index a3ba75cb2d..0000000000 --- a/travis/ext/pdo_mysql/setup.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -mysql -e "CREATE DATABASE IF NOT EXISTS test" diff --git a/travis/ext/pdo_pgsql/setup.sh b/travis/ext/pdo_pgsql/setup.sh deleted file mode 100755 index 5f3cf67f92..0000000000 --- a/travis/ext/pdo_pgsql/setup.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -export PDO_PGSQL_TEST_DSN='pgsql:host=localhost port=5432 dbname=test user=postgres password=' diff --git a/travis/ext/mysql/setup.sh b/travis/setup-mysql.sh similarity index 100% rename from travis/ext/mysql/setup.sh rename to travis/setup-mysql.sh diff --git a/travis/ext/pgsql/setup.sh b/travis/setup-pgsql.sh similarity index 100% rename from travis/ext/pgsql/setup.sh rename to travis/setup-pgsql.sh -- 2.40.0