diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-04-06 14:36:49 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-04-06 21:56:12 +0200 |
commit | c8df4f5df4d7f12b43a367ea43543bd244bd2743 (patch) | |
tree | 0fea550bdbcfd6fb9ec2f6f88940ea3ec4c11c82 /tests/acceptance/run.sh | |
parent | 50d35bee9f954aa1a7212dcc44c95a4a419e0500 (diff) | |
download | nextcloud-server-c8df4f5df4d7f12b43a367ea43543bd244bd2743.tar.gz nextcloud-server-c8df4f5df4d7f12b43a367ea43543bd244bd2743.zip |
Make possible to set the acceptance tests directory to use
When the acceptance tests were run they were always loaded from the
"tests/acceptance" directory of the Nextcloud server. Now it is possible
to set the directory used to look for the Behat configuration and the
Nextcloud installation script, which makes possible to run acceptance
tests for the apps too instead of only for the server (although if no
directory is explicitly given the tests for the server are the ones
run).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance/run.sh')
-rwxr-xr-x | tests/acceptance/run.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/acceptance/run.sh b/tests/acceptance/run.sh index 89fdda02630..d9153822841 100755 --- a/tests/acceptance/run.sh +++ b/tests/acceptance/run.sh @@ -197,6 +197,18 @@ trap cleanUp EXIT # the Git working directory to the container) expect that. cd "$(dirname $0)" +# "--acceptance-tests-dir XXX" option can be provided to set the directory +# (relative to the root directory of the Nextcloud server) used to look for the +# Behat configuration and the Nextcloud installation script. +# By default it is "tests/acceptance", that is, the acceptance tests for the +# Nextcloud server itself. +ACCEPTANCE_TESTS_DIR_OPTION="" +if [ "$1" = "--acceptance-tests-dir" ]; then + ACCEPTANCE_TESTS_DIR_OPTION="--acceptance-tests-dir $2" + + shift 2 +fi + # "--timeout-multiplier N" option can be provided before the specific scenario # to run, if any, to set the timeout multiplier to be used in the acceptance # tests. @@ -222,4 +234,4 @@ prepareSelenium prepareDocker echo "Running tests" -docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && tests/acceptance/run-local.sh $TIMEOUT_MULTIPLIER_OPTION allow-git-repository-modifications $SCENARIO_TO_RUN" +docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && tests/acceptance/run-local.sh $ACCEPTANCE_TESTS_DIR_OPTION $TIMEOUT_MULTIPLIER_OPTION allow-git-repository-modifications $SCENARIO_TO_RUN" |