Implement new handling of tiaf seed data

monroegm-disable-blank-issue-2
jonawals 5 years ago
parent 3b3b43413d
commit 656aa528d8

@ -0,0 +1,13 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
add_subdirectory(Executable)
add_subdirectory(Static)

@ -0,0 +1,12 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
add_subdirectory(Code)

@ -0,0 +1,25 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
ly_add_target(
NAME TestImpact.Frontend.Console EXECUTABLE
OUTPUT_NAME tiaf
NAMESPACE AZ
FILES_CMAKE
testimpactframework_frontend_console_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Source
BUILD_DEPENDENCIES
PRIVATE
AZ::TestImpact.Frontend.Console.Static
)

@ -0,0 +1,14 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
Source/TestImpactConsole.cpp
)

@ -0,0 +1,12 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
add_subdirectory(Code)

@ -0,0 +1,50 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
ly_add_target(
NAME TestImpact.Frontend.Console.Static STATIC
NAMESPACE AZ
FILES_CMAKE
testimpactframework_frontend_console_static_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
Include
PRIVATE
Source
BUILD_DEPENDENCIES
PUBLIC
AZ::TestImpact.Runtime.Static
)
################################################################################
# Tests
################################################################################
ly_add_target(
NAME TestImpact.Frontend.Console.Static.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE AZ
FILES_CMAKE
testimpactframework_frontend_console_static_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Include
Source
Tests
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTestShared
AZ::AzTest
AZ::TestImpact.Frontend.Console.Static
)
ly_add_googletest(
NAME AZ::TestImpact.Frontend.Console.Static.Tests
)

@ -0,0 +1,26 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
Include/TestImpactFramework/TestImpactConsoleMain.h
Source/TestImpactCommandLineOptions.h
Source/TestImpactCommandLineOptions.cpp
Source/TestImpactCommandLineOptionsUtils.cpp
Source/TestImpactCommandLineOptionsUtils.h
Source/TestImpactCommandLineOptionsException.h
Source/TestImpactRuntimeConfigurationFactory.h
Source/TestImpactRuntimeConfigurationFactory.cpp
Source/TestImpactConsoleMain.cpp
Source/TestImpactConsoleTestSequenceEventHandler.cpp
Source/TestImpactConsoleTestSequenceEventHandler.h
Source/TestImpactConsoleUtils.cpp
Source/TestImpactConsoleUtils.h
)

@ -0,0 +1,14 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
)

@ -35,8 +35,6 @@ set(FILES
Source/Artifact/Factory/TestImpactTestTargetMetaMapFactory.h
Source/Artifact/Factory/TestImpactModuleCoverageFactory.cpp
Source/Artifact/Factory/TestImpactModuleCoverageFactory.h
Source/Artifact/Factory/TestImpactDependencyGraphDataFactory.cpp
Source/Artifact/Factory/TestImpactDependencyGraphDataFactory.h
Source/Artifact/Static/TestImpactBuildTargetDescriptor.cpp
Source/Artifact/Static/TestImpactBuildTargetDescriptor.h
Source/Artifact/Static/TestImpactTargetDescriptorCompiler.cpp

@ -0,0 +1,13 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
)

@ -3,6 +3,13 @@
"platform": "${platform}",
"timestamp": "${timestamp}"
},
"jenkins": {
"pipeline_of_truth" : [
"nightly-incremental",
"nightly-clean"
],
"use_test_impact_analysis": ${use_tiaf}
},
"repo": {
"root": "${repo_dir}",
"tiaf_bin": "${tiaf_bin}"

@ -344,9 +344,14 @@ function(ly_test_impact_write_config_file CONFIG_TEMPLATE_FILE PERSISTENT_DATA_D
# Instrumentation binary
if(NOT LY_TEST_IMPACT_INSTRUMENTATION_BIN)
message(FATAL_ERROR "No test impact framework instrumentation binary was specified, please provide the path with option LY_TEST_IMPACT_INSTRUMENTATION_BIN")
# No binary specified is not an error, it just means that the test impact analysis part of the framework is disabled
message("No test impact framework instrumentation binary was specified, test impact analysis framework will fall back to regular test sequences instead")
set(use_tiaf false)
set(instrumentation_bin "")
else()
set(use_tiaf true)
file(TO_CMAKE_PATH ${LY_TEST_IMPACT_INSTRUMENTATION_BIN} instrumentation_bin)
endif()
file(TO_CMAKE_PATH ${LY_TEST_IMPACT_INSTRUMENTATION_BIN} instrumentation_bin)
# Testrunner binary
set(test_runner_bin $<TARGET_FILE:AzTestRunner>)

@ -447,7 +447,7 @@ try {
// repositoryName is the full repository name
repositoryName = (repositoryUrl =~ /https:\/\/github.com\/(.*)\.git/)[0][1]
(projectName, pipelineName) = GetRunningPipelineName(env.JOB_NAME) // env.JOB_NAME is the name of the job given by Jenkins
env.PIPELINE_NAME = pipelineName
if(env.BRANCH_NAME) {
branchName = env.BRANCH_NAME
} else {

@ -22,16 +22,17 @@
],
"steps": [
"debug_vs2019",
"test_impact_seed",
"test_debug_vs2019"
]
},
"profile_vs2019_pipe": {
"TAGS": [
"default"
"default",
"nightly-incremental",
"nightly-clean"
],
"steps": [
"profile_vs2019",
"profile_vs2019",
"test_impact_analysis",
"asset_profile_vs2019",
"test_cpu_profile_vs2019"
@ -81,22 +82,13 @@
"SCRIPT_PARAMETERS": "--platform 3rdParty --type 3rdParty_all"
}
},
"test_impact_seed": {
"TAGS": [
],
"COMMAND": "python_windows.cmd",
"PARAMETERS": {
"SCRIPT_PATH": "scripts/build/TestImpactAnalysis/tiaf_driver.py",
"SCRIPT_PARAMETERS": "--sequenceType seed --config \"build\\windows_vs2019\\bin\\TestImpactFramework\\persistent\\tiaf.debug.json\""
}
},
"test_impact_analysis": {
"TAGS": [
],
"COMMAND": "python_windows.cmd",
"PARAMETERS": {
"SCRIPT_PATH": "scripts/build/TestImpactAnalysis/tiaf_driver.py",
"SCRIPT_PARAMETERS": "--sequenceType tia --destCommit !CHANGE_ID! --config \"build\\windows_vs2019\\bin\\TestImpactFramework\\persistent\\tiaf.profile.json\""
"SCRIPT_PARAMETERS": "--safeMode --suite main --pipeline !PIPELINE_NAME! --destCommit !CHANGE_ID! --config \"build\\windows_vs2019\\bin\\TestImpactFramework\\persistent\\tiaf.profile.json\""
}
},
"debug_vs2019": {
@ -107,7 +99,7 @@
"PARAMETERS": {
"CONFIGURATION": "debug",
"OUTPUT_DIRECTORY": "build\\windows_vs2019",
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_BUILD_WITH_INCREMENTAL_LINKING_DEBUG=FALSE -DLY_TEST_IMPACT_ACTIVE=1 -DLY_TEST_IMPACT_INSTRUMENTATION_BIN=\"c:\\ly\\3rdParty\\ackages\\OpenCppCoverage\\Binary\\windows-x64\\OpenCppCoverage.exe\"",
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_BUILD_WITH_INCREMENTAL_LINKING_DEBUG=FALSE",
"CMAKE_LY_PROJECTS": "AutomatedTesting",
"CMAKE_TARGET": "ALL_BUILD",
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"
@ -139,7 +131,7 @@
"PARAMETERS": {
"CONFIGURATION": "profile",
"OUTPUT_DIRECTORY": "build\\windows_vs2019",
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_TEST_IMPACT_ACTIVE=1 -DLY_TEST_IMPACT_INSTRUMENTATION_BIN=\"c:\\ly\\3rdParty\\ackages\\OpenCppCoverage\\Binary\\windows-x64\\OpenCppCoverage.exe\"",
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_TEST_IMPACT_ACTIVE=1 -DLY_TEST_IMPACT_INSTRUMENTATION_BIN=!TEST_IMPACT_WIN_BINARY!",
"CMAKE_LY_PROJECTS": "AutomatedTesting",
"CMAKE_TARGET": "ALL_BUILD",
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"

Loading…
Cancel
Save