Browse Source

Add some explanations about the new scripts

pull/7643/head
Philipp Holzer 2 weeks ago
parent
commit
cd46a5650a
No account linked to committer's email address
3 changed files with 21 additions and 1 deletions
  1. 1
    1
      .travis.yml
  2. 15
    0
      autotest.sh
  3. 5
    0
      bin/wait-for-connection

+ 1
- 1
.travis.yml View File

@@ -26,4 +26,4 @@ before_script:
26 26
  - phpenv config-add .travis/redis.ini
27 27
  - phpenv config-add .travis/memcached.ini
28 28
 
29
-script: vendor/bin/phpunit --configuration tests/phpunit.xml
29
+script: vendor/bin/phpunit --configuration tests/phpunit.xml

+ 15
- 0
autotest.sh View File

@@ -1,4 +1,19 @@
1 1
 #!/usr/bin/env bash
2
+#
3
+# This script is used for autotesting the Friendica codebase with different
4
+# types of tests and environments.
5
+#
6
+# Currently, there are three types of autotesting possibilities:
7
+# - "USEDOCKER=true ./autotest.sh" will start a database docker container for testing
8
+# - "./autotest.sh" on the Drone CI environment will use the database container of the drone CI pipeline
9
+# - "./autotest.sh" on a local environment will try to use the local database instance for testing
10
+#
11
+# You can specify a database (mysql, mariadb currently) for the db backend of Friendica ("./autotest.sh mysql")
12
+# And you can specify some parameters for the test, like:
13
+# - NOCOVERAGE=true ... Don't create a coverage XML (this is only useful if you will send coverage to codecov.io)
14
+# - NOINSTALL=true  ... Skip the whole Friendica installation process (e.g. you just test Caching drivers)
15
+# - TEST_SELECTION= ... Specify which tests are used to run (based on the test-labeling)
16
+# - XDEBUG_CONFIG=  ... Set some XDEBUG specific environment settings for development
2 17
 
3 18
 DATABASENAME=${MYSQL_DATABASE:-test}
4 19
 DATABASEUSER=${MYSQL_USERNAME:-friendica}

+ 5
- 0
bin/wait-for-connection View File

@@ -1,4 +1,9 @@
1 1
 #!/usr/bin/php
2
+#
3
+# This script tries to connect to a database for a given interval
4
+# Useful in case of installation e.g. to wait for the database to not generate unnecessary errors
5
+#
6
+# Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
2 7
 
3 8
 <?php
4 9
 $timeout = 60;

Loading…
Cancel
Save