From cd46a5650ab0eaf4e804b748ccff346dee9245a9 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Mon, 30 Sep 2019 14:33:49 +0200 Subject: [PATCH] Add some explanations about the new scripts --- .travis.yml | 2 +- autotest.sh | 15 +++++++++++++++ bin/wait-for-connection | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f8ea715ff..376748bcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,4 +26,4 @@ before_script: - phpenv config-add .travis/redis.ini - phpenv config-add .travis/memcached.ini -script: vendor/bin/phpunit --configuration tests/phpunit.xml \ No newline at end of file +script: vendor/bin/phpunit --configuration tests/phpunit.xml diff --git a/autotest.sh b/autotest.sh index 88e2c24ce..15067bf9d 100755 --- a/autotest.sh +++ b/autotest.sh @@ -1,4 +1,19 @@ #!/usr/bin/env bash +# +# This script is used for autotesting the Friendica codebase with different +# types of tests and environments. +# +# Currently, there are three types of autotesting possibilities: +# - "USEDOCKER=true ./autotest.sh" will start a database docker container for testing +# - "./autotest.sh" on the Drone CI environment will use the database container of the drone CI pipeline +# - "./autotest.sh" on a local environment will try to use the local database instance for testing +# +# You can specify a database (mysql, mariadb currently) for the db backend of Friendica ("./autotest.sh mysql") +# And you can specify some parameters for the test, like: +# - NOCOVERAGE=true ... Don't create a coverage XML (this is only useful if you will send coverage to codecov.io) +# - NOINSTALL=true ... Skip the whole Friendica installation process (e.g. you just test Caching drivers) +# - TEST_SELECTION= ... Specify which tests are used to run (based on the test-labeling) +# - XDEBUG_CONFIG= ... Set some XDEBUG specific environment settings for development DATABASENAME=${MYSQL_DATABASE:-test} DATABASEUSER=${MYSQL_USERNAME:-friendica} diff --git a/bin/wait-for-connection b/bin/wait-for-connection index 81f5e169e..eeb9ba980 100755 --- a/bin/wait-for-connection +++ b/bin/wait-for-connection @@ -1,4 +1,9 @@ #!/usr/bin/php +# +# This script tries to connect to a database for a given interval +# Useful in case of installation e.g. to wait for the database to not generate unnecessary errors +# +# Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]