runtime_test_impact_args.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. from enum import Enum
  9. value = 0
  10. class RuntimeArgs(Enum):
  11. """
  12. Enum for all of the possible arguments that we could pass through to the TIAF runtime.
  13. Defined by three properties:
  14. driver_argument: The argument that will be passed to the tiaf_driver. This can be used in TestImpact objects to access any of the values that might be passed by TIAF driver arguments.
  15. runtime_arg: The argument that we will set the value to.
  16. message: The message to log when we apply this argument to the runtime.
  17. """
  18. # Base arguments
  19. COMMON_SEQUENCE = ("sequence", "--sequence=", "Sequence type is set to: ")
  20. COMMON_FPOLICY = ("test_failure_policy", "--fpolicy=",
  21. "Test failure policy is set to: ")
  22. COMMON_SUITES = ("suites", "--suites=", "Test suites is set to: ")
  23. COMMON_LABEL_EXCLUDES = ("label_excludes", "--labelexcludes=", "Suite label excludes is set to: ")
  24. COMMON_EXCLUDE = ("exclude_file", "--excluded=",
  25. "Exclude file found, excluding tests stored at: ")
  26. COMMON_TEST_TIMEOUT = ("test_timeout", "--ttimeout=",
  27. "Test target timeout in seconds is set to: ")
  28. COMMON_GLOBAL_TIMEOUT = ("global_timeout", "--gtimeout=",
  29. "Global sequence timeout in seconds is set to: ")
  30. COMMON_IPOLICY = ("integration_policy", "--ipolicy=",
  31. "Integration failure policy is set to: ")
  32. COMMON_CHANGELIST = ("change_list", "--changelist=", "Change list is set to: ")
  33. COMMON_REPORT = ("report", "--report=", "Sequencer report file is set to: ")
  34. COMMON_TARGET_OUTPUT = ("target_output", "--targetout=",
  35. "Test target output capture is set to: ")
  36. # Native arguments
  37. NATIVE_SAFEMODE = ("safe_mode", "--safemode=", "Safe mode set to: ")
  38. # Python arguments
  39. PYTHON_TEST_RUNNER = ("testrunner_policy", "--testrunner=", "Test runner policy is set to: ")
  40. def __init__(self, driver_argument, runtime_arg, message):
  41. self.driver_argument = driver_argument
  42. self.runtime_arg = runtime_arg
  43. self.message = message