Skip to content

Commit 6b14a0b

Browse files
committed
Disable test orchestrator on integration tests
1 parent 6b78fef commit 6b14a0b

File tree

1 file changed

+17
-25
lines changed

1 file changed

+17
-25
lines changed

scripts/run_test_in_devicefarm.sh

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/bin/bash
22
project_arn=$DEVICEFARM_PROJECT_ARN
33
max_devices=$NUMBER_OF_DEVICES_TO_TEST
4-
test_spec_arn=$DEVICEFARM_TEST_SPEC_ARN
5-
module_path=$1
6-
# Extract everything after the last "/" if it exists, otherwise use the full value
7-
module_name=${1##*/}
8-
4+
module_name=$1
95
file_name="$module_name-debug-androidTest.apk"
10-
full_path="$module_path/build/outputs/apk/androidTest/debug/$file_name"
6+
full_path="$module_name/build/outputs/apk/androidTest/debug/$file_name"
117

128
if [[ -z "${project_arn}" ]]; then
139
echo "DEVICEFARM_PROJECT_ARN environment variable not set."
@@ -115,19 +111,19 @@ stopDuplicates
115111
# Schedule the test run in device farm
116112
echo "Scheduling test run"
117113
run_arn=`aws devicefarm schedule-run --project-arn=$project_arn \
118-
--app-arn="$app_package_upload_arn" \
119-
--device-selection-configuration='{
120-
"filters": [
121-
{"attribute": "ARN", "operator":"IN", "values":["'$minDevice'", "'$middleDevice'", "'$latestDevice'"]}
122-
],
123-
"maxDevices": '$max_devices'
124-
}' \
125-
--name="$file_name-$CODEBUILD_SOURCE_VERSION" \
126-
--test="testSpecArn=$test_spec_arn,type=INSTRUMENTATION,testPackageArn=$test_package_upload_arn" \
127-
--execution-configuration="jobTimeoutMinutes=30,videoCapture=false" \
128-
--query="run.arn" \
129-
--output=text \
130-
--region="us-west-2"`
114+
--app-arn="$app_package_upload_arn" \
115+
--device-selection-configuration='{
116+
"filters": [
117+
{"attribute": "ARN", "operator":"IN", "values":["'$minDevice'", "'$middleDevice'", "'$latestDevice'"]}
118+
],
119+
"maxDevices": '$max_devices'
120+
}' \
121+
--name="$file_name-$CODEBUILD_SOURCE_VERSION" \
122+
--test="type=INSTRUMENTATION,testPackageArn=$test_package_upload_arn" \
123+
--execution-configuration="jobTimeoutMinutes=30,videoCapture=false" \
124+
--query="run.arn" \
125+
--output=text \
126+
--region="us-west-2"`
131127

132128
status='NONE'
133129
result='NONE'
@@ -145,15 +141,11 @@ while true; do
145141
done
146142
echo "Status = $status Result = $result"
147143

148-
./scripts/python/generate_df_testrun_report.py \
149-
-r "$run_arn" \
150-
-m "$module_name" \
151-
-o "build/allTests/$module_name/"
152-
144+
./scripts/generate_df_testrun_report --run_arn="$run_arn" --module_name="$module_name" --pr="$CODEBUILD_SOURCE_VERSION" --output_path="build/allTests/$module_name/"
153145
# If the result is PASSED, then exit with a return code 0
154146
if [ "$result" = "PASSED" ]
155147
then
156148
exit 0
157149
fi
158150
# Otherwise, exit with a non-zero.
159-
exit 1
151+
exit 1

0 commit comments

Comments
 (0)