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

{CI} Put the cloud module at the end of the serial execution to avoid affecting other tests. #26824

Merged
merged 3 commits into from
Jul 10, 2023
Merged
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
18 changes: 12 additions & 6 deletions scripts/ci/automation_full_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,19 +568,25 @@ def run_instance_modules(self, instance_modules):
serial_tests.append(k)
else:
parallel_tests.append(k)
# Put the cloud module at the end of the serial execution
# Since it will cause the test_get_docker_credentials test to fail
# TODO: Find the root cause of the failure and modify the test code.
if 'cloud' in serial_tests:
serial_tests.remove('cloud')
serial_tests.append('cloud')
pipeline_result = build_pipeline_result() if enable_pipeline_result else None
if serial_tests:
azdev_test_result_fp = os.path.join(azdev_test_result_dir, f"test_results_{python_version}_{profile}_{instance_idx}.serial.xml")
cmd = ['azdev', 'test', '--no-exitfirst', '--verbose', '--series'] + serial_tests + \
['--profile', f'{profile}', '--xml-path', azdev_test_result_fp, '--pytest-args', '-o junit_family=xunit1 --durations=10 --tb=no']
serial_error_flag = process_test(cmd, azdev_test_result_fp, live_rerun=fix_failure_tests)
pipeline_result = get_pipeline_result(azdev_test_result_fp, pipeline_result) if enable_pipeline_result else None
if parallel_tests:
azdev_test_result_fp = os.path.join(azdev_test_result_dir, f"test_results_{python_version}_{profile}_{instance_idx}.parallel.xml")
cmd = ['azdev', 'test', '--no-exitfirst', '--verbose'] + parallel_tests + \
['--profile', f'{profile}', '--xml-path', azdev_test_result_fp, '--pytest-args', '-o junit_family=xunit1 --durations=10 --tb=no']
parallel_error_flag = process_test(cmd, azdev_test_result_fp, live_rerun=fix_failure_tests)
pipeline_result = get_pipeline_result(azdev_test_result_fp, pipeline_result) if enable_pipeline_result else None
if serial_tests:
azdev_test_result_fp = os.path.join(azdev_test_result_dir, f"test_results_{python_version}_{profile}_{instance_idx}.serial.xml")
cmd = ['azdev', 'test', '--no-exitfirst', '--verbose', '--series'] + serial_tests + \
['--profile', f'{profile}', '--xml-path', azdev_test_result_fp, '--pytest-args', '-o junit_family=xunit1 --durations=10 --tb=no']
serial_error_flag = process_test(cmd, azdev_test_result_fp, live_rerun=fix_failure_tests)
pipeline_result = get_pipeline_result(azdev_test_result_fp, pipeline_result) if enable_pipeline_result else None
save_pipeline_result(pipeline_result) if enable_pipeline_result else None
return serial_error_flag or parallel_error_flag

Expand Down
Loading