Skip to content

Commit

Permalink
BITRISE_TEST_BUNDLE_ZIP_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang committed Feb 28, 2024
1 parent a055afd commit db9ddbe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion scripts/percy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
45 changes: 24 additions & 21 deletions scripts/percy_upload_test_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit db9ddbe

Please sign in to comment.