Address PR comments

This commit is contained in:
John
2021-06-10 14:54:46 +01:00
parent fdbc15b195
commit 169d4da288
32 changed files with 1631 additions and 164 deletions
@@ -88,7 +88,7 @@
"COMMAND": "python_windows.cmd",
"PARAMETERS": {
"SCRIPT_PATH": "scripts/build/TestImpactAnalysis/tiaf_driver.py",
"SCRIPT_PARAMETERS": "--testFailurePolicy abort --safeMode --suite main --pipeline !PIPELINE_NAME! --destCommit !CHANGE_ID! --config \"build\\windows_vs2019\\bin\\TestImpactFramework\\persistent\\tiaf.profile.json\""
"SCRIPT_PARAMETERS": "--testFailurePolicy abort --safeMode --suite main --pipeline !PIPELINE_NAME! --destCommit !CHANGE_ID! --config \"!OUTPUT_DIRECTORY!\\TestImpactFramework\\persistent\\tiaf.profile.json\""
}
},
"debug_vs2019": {
+1 -46
View File
@@ -219,49 +219,4 @@ class TestImpact:
else:
print(f"The test impact analysis runtime returned with error: '{result.returncode}'.")
return result.returncode
#args = []
#print("Please note: test impact analysis sequences will be run in read-only mode (seed sequences are unaffected).")
#if sequence_type == SequenceType.REGULAR:
# print("Sequence type: regular.")
# args.append("--sequence=regular")
# args.append("--fpolicy=abort")
#elif sequence_type == SequenceType.SEED:
# print("Sequence type: seed.")
# args.append("--sequence=seed")
# args.append("--fpolicy=continue")
#elif sequence_type == SequenceType.TEST_IMPACT_ANALYSIS:
# print("Sequence type: test impact analysis (no write).")
# args.append("--fpolicy=abort")
# if self.__has_change_list:
# args.append(f"-changelist={self.__change_list_path}")
# args.append("--sequence=tianowrite")
# else:
# print(f"No change list was generated, falling back to a regular sequence.")
# print("Sequence type: Regular.")
# args.append("--sequence=regular")
#else:
# raise ValueError(sequence_type)
#
#if test_timeout != None:
# args.append(f"--ttimeout={test_timeout}")
# print(f"Test target timeout is set to {test_timeout} seconds.")
#if global_timeout != None:
# args.append(f"--gtimeout={global_timeout}")
# print(f"Global sequence timeout is set to {test_timeout} seconds.")
#
#print("Args: ", end='')
#print(*args)
#result = subprocess.run([self.__tiaf_bin] + args)
#if result.returncode == 0:
# print("Test impact analysis runtime returned successfully.")
# if sequence_type == SequenceType.SEED:
# print("Writing historical meta-data...")
# self.__write_last_run_hash(self.__dst_commit)
# print("Complete!")
#else:
# print(f"The test impact analysis runtime returned with error: '{result.returncode}'.")
#return result.returncode
@@ -57,4 +57,5 @@ if __name__ == "__main__":
args = parse_args()
tiaf = TestImpact(args.config, args.pipeline, args.dst_commit)
return_code = tiaf.run(args.suite, args.test_failure_policy, args.safe_mode, args.test_timeout, args.global_timeout)
sys.exit(return_code)
sys.exit(return_code)