From b7b092247e43056417e4b69e37f323f9641fffb4 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Mon, 21 Dec 2015 03:01:00 +0100 Subject: [PATCH] Temporary turns off control automation test since those cases are already covered in unit tests, and re-enables example app signing. --- scripts/automation-tests.sh | 23 +++++++++++---------- scripts/automation-tests/03_masterDetail.js | 2 +- scripts/automation-tests/main.js | 3 ++- scripts/common.sh | 2 +- scripts/pre-release-tests.sh | 4 ++-- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/scripts/automation-tests.sh b/scripts/automation-tests.sh index 105fc690..bf571aba 100755 --- a/scripts/automation-tests.sh +++ b/scripts/automation-tests.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -NUM_OF_TESTS=14 +NUM_OF_TESTS=4 CURRENT_DIR="$( dirname "${BASH_SOURCE[0]}" )" BUILD_DIRECTORY=build APP=RxExample @@ -21,9 +21,6 @@ function runAutomation() { APP="${SCHEME}" - echo - echo - echo echo printf "${GREEN}Building example for automation ${BOLDCYAN}${SIMULATOR} - ${CONFIGURATION}${RESET}" echo @@ -36,11 +33,15 @@ function runAutomation() { osascript -e 'quit app "iOS Simulator.app"' > /dev/null - echo - printf "${GREEN}Firing up simulator ${BOLDCYAN}${SIMULATOR}${GREEN}...${RESET}\n" - echo - - xcrun instruments -w ${SIMULATOR} > /dev/null 2>&1 || echo + if is_real_device "${SIMULATOR}"; then + SIMULATOR_ID="${SIMULATOR}" + else + SIMULATOR_ID=`simulator_ids "${SIMULATOR}"` + echo + printf "${GREEN}Firing up simulator ${BOLDCYAN}${SIMULATOR}${GREEN}...${RESET}\n" + echo + xcrun instruments -w ${SIMULATOR_ID} > /dev/null 2>&1 || echo + fi echo if is_real_device "${SIMULATOR}"; then @@ -55,7 +56,7 @@ function runAutomation() { if is_real_device "${SIMULATOR}"; then /Users/kzaher/Projects/ios-deploy/ios-deploy --bundle "${APP_PATH}" else - xcrun simctl install ${SIMULATOR} "${APP_PATH}" + xcrun simctl install ${SIMULATOR_ID} "${APP_PATH}" fi pushd $TMPDIR @@ -65,7 +66,7 @@ function runAutomation() { echo OUTPUT="${TMPDIR}/output.txt" - instruments -w "${SIMULATOR}" -t Automation "${APP_PATH}" -e UIASCRIPT "${ROOT}/scripts/automation-tests/main.js" | tee "${OUTPUT}" #| grep "Pass" #|| (open instrumentscli0.trace; exit -1;) + instruments -w "${SIMULATOR_ID}" -t Automation "${APP_PATH}" -e UIASCRIPT "${ROOT}/scripts/automation-tests/main.js" | tee "${OUTPUT}" #| grep "Pass" #|| (open instrumentscli0.trace; exit -1;) COUNT=`grep Pass: "$TMPDIR/output.txt" | wc -l` if [ "$COUNT" -lt "$NUM_OF_TESTS" ]; then diff --git a/scripts/automation-tests/03_masterDetail.js b/scripts/automation-tests/03_masterDetail.js index e184ba23..a5a5a7f6 100644 --- a/scripts/automation-tests/03_masterDetail.js +++ b/scripts/automation-tests/03_masterDetail.js @@ -19,7 +19,7 @@ test("----- masterDetail -----", function (check, pass) { firstCell.buttons()["Delete"].tap(); - target.delay( 2 ); + target.delay( 3 ); target.frontMostApp().navigationBar().rightButton().tap(); target.frontMostApp().mainWindow().tableViews()[0].cells()[1].tap(); diff --git a/scripts/automation-tests/main.js b/scripts/automation-tests/main.js index eedb9349..40a6e341 100644 --- a/scripts/automation-tests/main.js +++ b/scripts/automation-tests/main.js @@ -3,7 +3,7 @@ #import "01_githubSignUp.js" #import "02_searchWikipedia.js" #import "03_masterDetail.js" -#import "04_controlsTests.js" +//#import "04_controlsTests.js" #import "05_reactivePartialUpdates.js" var target = UIATarget.localTarget(); @@ -11,6 +11,7 @@ var target = UIATarget.localTarget(); // open all screens for (var i = 0; i < 11; ++i) { log(i); + target.delay( 0.5 ); target.frontMostApp().mainWindow().tableViews()[0].cells()[i].tap(); target.frontMostApp().navigationBar().leftButton().tap(); } diff --git a/scripts/common.sh b/scripts/common.sh index e002c509..a9d69c4c 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -139,7 +139,7 @@ function action() { -configuration "${CONFIGURATION}" \ -derivedDataPath "${BUILD_DIRECTORY}" \ -destination "$DESTINATION" \ - $ACTION CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c; STATUS=${PIPESTATUS[0]} + $ACTION | xcpretty -c; STATUS=${PIPESTATUS[0]} if [ $STATUS -ne 0 ]; then echo $STATUS diff --git a/scripts/pre-release-tests.sh b/scripts/pre-release-tests.sh index f2373e77..325c0eab 100755 --- a/scripts/pre-release-tests.sh +++ b/scripts/pre-release-tests.sh @@ -107,8 +107,8 @@ done . scripts/playgrounds.sh if [ "${RELEASE_TEST}" -eq 1 ]; then - scripts/validate-podspec.sh - mdast -u mdast-slug -u mdast-validate-links ./*.md mdast -u mdast-slug -u mdast-validate-links ./**/*.md + + scripts/validate-podspec.sh fi