diff --git a/ci/script.sh b/ci/script.sh index e7ab4d557..bb02a94ec 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -55,9 +55,16 @@ elif [[ $CI_CONFIG == 'build_gappium' ]]; then echo Xcode version: `xcodebuild build -version` echo Xcode path: `xcode-select --print-path` echo JAVA_HOME: $JAVA_HOME - ./reset.sh --hardcore --no-npmlink --dev --gappium - #./ci/upload_build_to_sauce.sh - #BRANCH_CAT=gappium ./ci/git-push.sh + ./reset.sh --hardcore --ios --android --selendroid --no-npmlink + ./reset.sh --gappium --dev --no-npmlink + if [[ $TRAVIS_SECURE_ENV_VARS == true ]]; then + rm sample-code/apps/io.appium.gappium.sampleapp + mv submodules/io.appium.gappium.sampleapp sample-code/apps/ + ./ci/upload_build_to_sauce.sh + sed -i.bak s/CI_CONFIG=functional/CI_CONFIG=run_gappium/g ci/travis-functional.yml + rm ci/*.bak + BRANCH_CAT=gappium ./ci/git-push.sh + fi elif [[ $CI_CONFIG == 'functional' ]]; then TARBALL=sauce-storage:$(node ./ci/tools/build-upload-tool.js \ ./ci/build-upload-info.json filename) @@ -67,4 +74,14 @@ elif [[ $CI_CONFIG == 'functional' ]]; then if [[ -n "$TEST_FILES" ]]; then TARBALL=$TARBALL ci/mocha ${TEST_FILES} fi +elif [[ $CI_CONFIG == 'run_gappium' ]]; then + TARBALL=sauce-storage:$(node ./ci/tools/build-upload-tool.js \ + ./ci/build-upload-info.json filename) + if [[ $TEST_GROUP == 'group 1' ]]; then + TARBALL=$TARBALL ci/mochas/android-mocha test/functional/gappium/**/*-specs.js + elif [[ $TEST_GROUP == 'group 2' ]]; then + TARBALL=$TARBALL ci/mochas/ios71-mocha test/functional/gappium/**/*-specs.js + elif [[ $TEST_GROUP == 'group 3' ]]; then + TARBALL=$TARBALL ci/mochas/selendroid-mocha test/functional/gappium/**/*-specs.js + fi fi diff --git a/test/functional/gappium/basic-specs.js b/test/functional/gappium/basic-specs.js index bc76ce679..77046d6b9 100644 --- a/test/functional/gappium/basic-specs.js +++ b/test/functional/gappium/basic-specs.js @@ -2,23 +2,22 @@ "use strict"; var env = require("../../helpers/env") - , setup = require("../common/setup-base") - , path = require('path'); + , setup = require("../common/setup-base"); var desired; if (env.DEVICE === 'selendroid' || env.DEVICE === 'android') { - var appPath = path.resolve(__dirname, '../../../sample-code/apps/' + + var appPath = 'sample-code/apps/' + 'io.appium.gappium.sampleapp/platforms/android/ant-build/' + - 'HelloGappium-debug.apk'), + 'HelloGappium-debug.apk', desired = { app: appPath, appPackage: 'io.appium.gappium.sampleapp', appActivity: '.HelloGappium', }; } else { - var appPath = path.resolve(__dirname, '../../../sample-code/apps/' + + var appPath = 'sample-code/apps/' + 'io.appium.gappium.sampleapp/platforms/ios/build' + - (env.EMU ? '/emulator' : '') + '/HelloGappium.app'), + (env.EMU ? '/emulator' : '') + '/HelloGappium.app', desired = { app: appPath }; diff --git a/test/helpers/session.js b/test/helpers/session.js index bfea91e46..807b3a41b 100644 --- a/test/helpers/session.js +++ b/test/helpers/session.js @@ -84,6 +84,7 @@ module.exports.initSession = function (desired, opts) { return browser .init(caps) .catch(function (err) { + if (env.VERBOSE) console.log("Init failed with error -->", err); remainingAttempts --; if (remainingAttempts === 0) { throw err;