11#! /bin/bash
22project_arn=$DEVICEFARM_PROJECT_ARN
33max_devices=$NUMBER_OF_DEVICES_TO_TEST
4- test_spec_arn=$DEVICEFARM_TEST_SPEC_ARN
54module_path=$1
65# Extract everything after the last "/" if it exists, otherwise use the full value
76module_name=${1##*/ }
@@ -115,19 +114,19 @@ stopDuplicates
115114# Schedule the test run in device farm
116115echo " Scheduling test run"
117116run_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" `
117+ --app-arn=" $app_package_upload_arn " \
118+ --device-selection-configuration=' {
119+ "filters": [
120+ {"attribute": "ARN", "operator":"IN", "values":["' $minDevice ' ", "' $middleDevice ' ", "' $latestDevice ' "]}
121+ ],
122+ "maxDevices": ' $max_devices '
123+ }' \
124+ --name=" $file_name -$CODEBUILD_SOURCE_VERSION " \
125+ --test=" type=INSTRUMENTATION,testPackageArn=$test_package_upload_arn " \
126+ --execution-configuration=" jobTimeoutMinutes=30,videoCapture=false" \
127+ --query=" run.arn" \
128+ --output=text \
129+ --region=" us-west-2" `
131130
132131status=' NONE'
133132result=' NONE'
@@ -145,15 +144,11 @@ while true; do
145144done
146145echo " Status = $status Result = $result "
147146
148- ./scripts/python/generate_df_testrun_report.py \
149- -r " $run_arn " \
150- -m " $module_name " \
151- -o " build/allTests/$module_name /"
152-
147+ ./scripts/generate_df_testrun_report --run_arn=" $run_arn " --module_name=" $module_name " --pr=" $CODEBUILD_SOURCE_VERSION " --output_path=" build/allTests/$module_name /"
153148# If the result is PASSED, then exit with a return code 0
154149if [ " $result " = " PASSED" ]
155150then
156151 exit 0
157152fi
158153# Otherwise, exit with a non-zero.
159- exit 1
154+ exit 1
0 commit comments