From 4d88cab139c76571eeba35e8a74b5c818b4296e1 Mon Sep 17 00:00:00 2001 From: evanchia Date: Fri, 23 Apr 2021 11:32:44 -0700 Subject: [PATCH] Adding test metrics field to build config file --- scripts/build/Jenkins/Jenkinsfile | 2 +- .../build/Platform/Windows/build_config.json | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index 8d0c8d670d..57c4634caa 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -518,7 +518,7 @@ try { CreateBuildStage(pipelineConfig, platform.key, build_job.key, envVars).call() } - if (env.MARS_REPO && platform.key == 'Windows' && build_job_name.startsWith('test')) { + if (env.MARS_REPO && platform.value.build_types[build_job_name].PARAMETERS.contains('TEST_METRICS') && platform.value.build_types[build_job_name].PARAMETERS.TEST_METRICS) { def output_directory = platform.value.build_types[build_job_name].PARAMETERS.OUTPUT_DIRECTORY def configuration = platform.value.build_types[build_job_name].PARAMETERS.CONFIGURATION CreateTestMetricsStage(pipelineConfig, branchName, envVars, build_job_name, output_directory, configuration).call() diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index a4a5a52c4d..11213f11b2 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -104,7 +104,8 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_smoke TEST_SUITE_main", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", - "CTEST_OPTIONS": "-L \"(SUITE_smoke|SUITE_main)\" -LE \"(REQUIRES_gpu)\" -T Test" + "CTEST_OPTIONS": "-L \"(SUITE_smoke|SUITE_main)\" -LE \"(REQUIRES_gpu)\" -T Test", + "TEST_METRICS": true } }, "profile_vs2019": { @@ -151,7 +152,8 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_smoke TEST_SUITE_main", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", - "CTEST_OPTIONS": "-L \"(SUITE_smoke|SUITE_main)\" -LE \"(REQUIRES_gpu)\" -T Test" + "CTEST_OPTIONS": "-L \"(SUITE_smoke|SUITE_main)\" -LE \"(REQUIRES_gpu)\" -T Test", + "TEST_METRICS": true } }, "test_gpu_profile_vs2019": { @@ -169,7 +171,8 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_smoke TEST_SUITE_main", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", - "CTEST_OPTIONS": "-L \"(SUITE_smoke_REQUIRES_gpu|SUITE_main_REQUIRES_gpu)\" -T Test" + "CTEST_OPTIONS": "-L \"(SUITE_smoke_REQUIRES_gpu|SUITE_main_REQUIRES_gpu)\" -T Test", + "TEST_METRICS": true } }, "asset_profile_vs2019": { @@ -214,7 +217,8 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", - "CTEST_OPTIONS": "-L \"(SUITE_periodic)\" -T Test" + "CTEST_OPTIONS": "-L \"(SUITE_periodic)\" -T Test", + "TEST_METRICS": true } }, "sandbox_test_profile_vs2019": { @@ -233,7 +237,8 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_sandbox", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", - "CTEST_OPTIONS": "-L \"(SUITE_sandbox)\" -T Test" + "CTEST_OPTIONS": "-L \"(SUITE_sandbox)\" -T Test", + "TEST_METRICS": true } }, "benchmark_test_profile_vs2019": { @@ -249,7 +254,8 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", - "CTEST_OPTIONS": "-L \"(SUITE_benchmark)\" -T Test" + "CTEST_OPTIONS": "-L \"(SUITE_benchmark)\" -T Test", + "TEST_METRICS": true } }, "release_vs2019": {