Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/integration/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/*
Expand Down
4 changes: 0 additions & 4 deletions tests/preseed-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
31 changes: 31 additions & 0 deletions tests/travis/start_behat_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`
Expand Down