From db9ddbe7fbda9ce93afb234dbd37498717a55709 Mon Sep 17 00:00:00 2001 From: Rui Date: Wed, 28 Feb 2024 13:32:12 -0800 Subject: [PATCH] BITRISE_TEST_BUNDLE_ZIP_PATH --- scripts/percy_test.sh | 2 +- scripts/percy_upload_test_runner.sh | 45 +++++++++++++++-------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/scripts/percy_test.sh b/scripts/percy_test.sh index 03508ba60..b37ecb875 100755 --- a/scripts/percy_test.sh +++ b/scripts/percy_test.sh @@ -28,7 +28,7 @@ echo $PERCY_TOKEN PERCY_COMMIT=`git log --pretty=format:‘%H’ -n 1` # Remove the leading and trailing single quotes -PERCY_COMMIT="${PERCY_COMMIT#‘}" +PERCY_COMMIT="${PERCY_COMMIT:1:${#PERCY_COMMIT}-2}" echo "PERCY_COMMIT: $PERCY_COMMIT" ./scripts/percy_run_build.sh ruihuang_ry52wv:HXRCy79y5SDuDvvQw6Qw "$PERCY_BUILD_URL" "$PERCY_TEST_SUITE_URL" "$PERCY_TOKEN" "$PERCY_BRANCH" "$PERCY_COMMIT" diff --git a/scripts/percy_upload_test_runner.sh b/scripts/percy_upload_test_runner.sh index be709868e..03730e8a9 100755 --- a/scripts/percy_upload_test_runner.sh +++ b/scripts/percy_upload_test_runner.sh @@ -16,35 +16,38 @@ if [ -z "$1" ]; then fi PERCY_USER=$1 +TEST_BUNDLE_PATH=$2 -xcodebuild -workspace "dydx/dydx.xcworkspace" \ - -scheme "dydxV4UITests" -derivedDataPath /tmp/dydxV4UITests \ - -configuration Debug -sdk iphoneos build-for-testing +# xcodebuild -workspace "dydx/dydx.xcworkspace" \ +# -scheme "dydxV4UITests" -derivedDataPath /tmp/dydxV4UITests \ +# -configuration Debug -sdk iphoneos build-for-testing -derived_data_path=/tmp/dydxV4UITests/Build +# derived_data_path=/tmp/dydxV4UITests/Build -# # get the DerivedData folder -# derived_data_path=$(xcodebuild -workspace "dydx/dydx.xcworkspace" -scheme "dydxV4" -showBuildSettings | grep OBJROOT | cut -d "=" -f 2 - | sed 's/^ *//') +# # # get the DerivedData folder +# # derived_data_path=$(xcodebuild -workspace "dydx/dydx.xcworkspace" -scheme "dydxV4" -showBuildSettings | grep OBJROOT | cut -d "=" -f 2 - | sed 's/^ *//') -# # remove the last part of the path -# derived_data_path=$(dirname $derived_data_path) +# # # remove the last part of the path +# # derived_data_path=$(dirname $derived_data_path) -app_path="$derived_data_path/Products/Debug-iphoneos/dydxV4UITests-Runner.app" +# app_path="$derived_data_path/Products/Debug-iphoneos/dydxV4UITests-Runner.app" -if [ ! -d "$app_path" ]; then - echo "App path not found: $app_path" - exit 1 -fi +# if [ ! -d "$app_path" ]; then +# echo "App path not found: $app_path" +# exit 1 +# fi -if [ -f /tmp/dydxV4UITests.zip ]; then - rm /tmp/dydxV4UITests.zip -fi +# if [ -f /tmp/dydxV4UITests.zip ]; then +# rm /tmp/dydxV4UITests.zip +# fi + +# cwd=$(pwd) +# cp -r "$app_path" /tmp/dydxV4UITests-Runner.app +# cd /tmp +# zip -r dydxV4UITests.zip dydxV4UITests-Runner.app/ +# cd $cwd -cwd=$(pwd) -cp -r "$app_path" /tmp/dydxV4UITests-Runner.app -cd /tmp -zip -r dydxV4UITests.zip dydxV4UITests-Runner.app/ -cd $cwd +cp $TEST_BUNDLE_PATH /tmp/dydxV4UITests.zip response=`curl -u $PERCY_USER \ -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/test-suite" \