Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUMM-1770 test_repetition_mode is added for Xcode 13 stack #662

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ workflows:
- scheme: Datadog
- simulator_device: iPhone 11
- is_clean_build: 'yes'
- should_retry_test_on_fail: 'yes' # temporarily mutes flakiness until we collect more info (in RUMM-839) then fix it
- test_repetition_mode: 'retry_on_failure'
- maximum_test_repetitions: 2
- generate_code_coverage_files: 'yes'
- project_path: Datadog.xcworkspace
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Datadog-unit-tests.html"
Expand Down
2 changes: 1 addition & 1 deletion tools/nightly-unit-tests/bitrise.yml.src
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ workflows:
- simulator_device: $SIMULATOR_DEVICE
- simulator_os_version: $SIMULATOR_OS_VERSION
- is_clean_build: 'no'
- should_retry_test_on_fail: 'yes' # retry once to mitigate flakiness
- ## <RETRY_ON_FAIL> ##
- generate_code_coverage_files: 'yes'
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Unit-tests-${PROJECT_SCHEME}-${SIMULATOR_DEVICE} (${SIMULATOR_OS_VERSION}).html"
- deploy-to-bitrise-io: {}
Expand Down
5 changes: 5 additions & 0 deletions tools/nightly-unit-tests/src/bitrise_yml_writter.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ def __rendered_template(self):

template = template.replace('## <MACOS VERSION> ##', self.host_os_version)

if self.host_os_version.startswith('11'): # macOS 11.X Big Sur
template = template.replace('## <RETRY_ON_FAIL> ##', "test_repetition_mode: 'retry_on_failure'")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to specify maximum_test_repetitions as well? Or does it have a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, default value is 3, reasonable i guess.?
i didn't want to replace multiple lines in yaml in order not to deal with indentation issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally 👍 for keeping it simple like that.

else:
template = template.replace('## <RETRY_ON_FAIL> ##', "should_retry_test_on_fail: 'yes'")

return template

@staticmethod
Expand Down