diff --git a/tests/integration/run.sh b/tests/integration/run.sh index 8d87da030f8a..a88f09ac7028 100755 --- a/tests/integration/run.sh +++ b/tests/integration/run.sh @@ -73,6 +73,7 @@ export TEST_SERVER_URL="http://localhost:$PORT/ocs/" export TEST_SERVER_FED_URL="http://localhost:$PORT_FED/ocs/" #Set up personalized skeleton +PREVIOUS_SKELETON_DIR=$($OCC config:system:get skeletondirectory) $OCC config:system:set skeletondirectory --value="$(pwd)/skeleton" #Enable external storage app @@ -133,6 +134,12 @@ $OCC config:app:set core enable_external_storage --value=no $OCC app:disable testing +# Put back personalized skeleton +if test "A$PREVIOUS_SKELETON_DIR" = "A"; then + $OCC config:system:delete skeletondirectory +else + $OCC config:system:set skeletondirectory --value="$PREVIOUS_SKELETON_DIR" +fi # Clear storage folder rm -Rf work/local_storage/* diff --git a/tests/preseed-config.php b/tests/preseed-config.php index 1f735fe6a71a..4e182eb35300 100644 --- a/tests/preseed-config.php +++ b/tests/preseed-config.php @@ -22,7 +22,3 @@ if (substr(strtolower(PHP_OS), 0, 3) === 'win') { $CONFIG['openssl'] = ['config' => OC::$SERVERROOT . '/tests/data/openssl.cnf']; } - -if (getenv("TC") === "selenium") { - $CONFIG['skeletondirectory'] = OC::$SERVERROOT . '/tests/ui/skeleton'; -} \ No newline at end of file diff --git a/tests/travis/start_behat_tests.sh b/tests/travis/start_behat_tests.sh index 651d0a1ff49d..dfb38a637a7d 100755 --- a/tests/travis/start_behat_tests.sh +++ b/tests/travis/start_behat_tests.sh @@ -132,6 +132,11 @@ fi EXTRA_CAPABILITIES=$EXTRA_CAPABILITIES'"maxDuration":"3600"' +#Set up personalized skeleton +OCC=./occ +PREVIOUS_SKELETON_DIR=$($OCC config:system:get skeletondirectory) +$OCC config:system:set skeletondirectory --value="$(pwd)/tests/ui/skeleton" >/dev/null + echo "Running tests on '$BROWSER' ($BROWSER_VERSION) on $PLATFORM" export BEHAT_PARAMS='{"extensions" : {"Behat\\MinkExtension" : {"browser_name": "'$BROWSER'", "base_url" : "'$BASE_URL'", "selenium2":{"capabilities": {"browser": "'$BROWSER'", "version": "'$BROWSER_VERSION'", "platform": "'$PLATFORM'", "name": "'$TRAVIS_REPO_SLUG' - '$TRAVIS_JOB_NUMBER'", "extra_capabilities": {'$EXTRA_CAPABILITIES'}}, "wd_host":"http://'$SAUCE_USERNAME:$SAUCE_ACCESS_KEY'@localhost:4445/wd/hub"}}}}' export IPV4_URL @@ -146,6 +151,32 @@ else PASSED=false fi +if [ "$BEHAT_TAGS_OPTION_FOUND" != true ] +then + # The behat run above specified to skip scenarios tagged @skip + # Report them in a dry-run so they can be seen + # Big red error output is displayed if there are no matching scenarios - send it to null + DRY_RUN_FILE=$(mktemp) + lib/composer/bin/behat --dry-run --colors -c $BEHAT_YML --tags '@skip' $BEHAT_FEATURE 1>$DRY_RUN_FILE 2>/dev/null + if grep -q -m 1 'No scenarios' "$DRY_RUN_FILE" + then + # If there are no skip scenarios, then no need to report that + : + else + echo "" + echo "The following tests were skipped because they are tagged @skip:" + cat "$DRY_RUN_FILE" + fi + rm -f "$DRY_RUN_FILE" +fi + +# Put back personalized skeleton +if test "A$PREVIOUS_SKELETON_DIR" = "A"; then + $OCC config:system:delete skeletondirectory >/dev/null +else + $OCC config:system:set skeletondirectory --value="$PREVIOUS_SKELETON_DIR" >/dev/null +fi + if [ ! -z "$SAUCE_USERNAME" ] && [ ! -z "$SAUCE_ACCESS_KEY" ] && [ -e /tmp/saucelabs_sessionid ] then SAUCELABS_SESSIONID=`cat /tmp/saucelabs_sessionid`