diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h index 384111b823..7d726cecc1 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/JobRunner/TestImpactProcessJobRunner.h @@ -51,7 +51,7 @@ namespace TestImpact public: //! Constructs the job runner with the specified parameters to constrain job runs. //! @param maxConcurrentProcesses he maximum number of concurrent jobs in-flight. - JobRunner(size_t maxConcurrentProcesses); + explicit JobRunner(size_t maxConcurrentProcesses); //! Executes the specified jobs and returns the products of their labor. //! @param jobs The arguments (and other pertinent information) required for each job to be run. diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.cpp index 8d6c5c6739..065caf54bd 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.cpp @@ -95,8 +95,9 @@ namespace TestImpact { if (PopAndLaunch(process) == ProcessCallbackResult::Abort) { + // Client chose to abort the scheduler TerminateAllProcesses(ExitCondition::Terminated); - return ProcessSchedulerResult::Graceful; + return ProcessSchedulerResult::UserAborted; } } @@ -144,7 +145,7 @@ namespace TestImpact { // Client chose to abort the scheduler TerminateAllProcesses(ExitCondition::Terminated); - return ProcessSchedulerResult::Graceful; + return ProcessSchedulerResult::UserAborted; } else if (!m_processQueue.empty()) { @@ -153,7 +154,7 @@ namespace TestImpact { // Client chose to abort the scheduler TerminateAllProcesses(ExitCondition::Terminated); - return ProcessSchedulerResult::Graceful; + return ProcessSchedulerResult::UserAborted; } else { @@ -184,7 +185,7 @@ namespace TestImpact { // Client chose to abort the scheduler TerminateAllProcesses(ExitCondition::Terminated); - return ProcessSchedulerResult::Graceful; + return ProcessSchedulerResult::UserAborted; } } @@ -201,7 +202,7 @@ namespace TestImpact { // Client chose to abort the scheduler TerminateAllProcesses(ExitCondition::Terminated); - return ProcessSchedulerResult::Graceful; + return ProcessSchedulerResult::UserAborted; } else { diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.h index 7f562fb99e..769bf59ff8 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Process/Scheduler/TestImpactProcessScheduler.h @@ -51,9 +51,10 @@ namespace TestImpact }; //! Result of the process scheduling sequence. - enum class ProcessSchedulerResult : bool + enum class ProcessSchedulerResult : AZ::u8 { Graceful, //!< The scheduler completed its run without incident or was terminated gracefully in response to a client callback result. + UserAborted, //!< The scheduler aborted prematurely due to the user returning an abort value from thier callback handler. Timeout //!< The scheduler aborted its run prematurely due to its runtime exceeding the scheduler timeout value. }; @@ -88,7 +89,7 @@ namespace TestImpact public: //! Constructs the scheduler with the specified batch of processes. //! @param maxConcurrentProcesses The maximum number of concurrent processes in-flight. - ProcessScheduler(size_t maxConcurrentProcesses); + explicit ProcessScheduler(size_t maxConcurrentProcesses); ~ProcessScheduler(); //! Executes the specified processes and calls the client callbacks (if any) as each process progresses in its life cycle. diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.h index 287dd9e2d9..fedaf300f7 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Enumeration/TestImpactTestEnumerator.h @@ -74,7 +74,7 @@ namespace TestImpact //! Constructs a test enumerator with the specified parameters common to all enumeration job runs of this enumerator. //! @param maxConcurrentEnumerations The maximum number of enumerations to be in flight at any given time. - TestEnumerator(size_t maxConcurrentEnumerations); + explicit TestEnumerator(size_t maxConcurrentEnumerations); //! Executes the specified test enumeration jobs according to the specified cache and job exception policies. //! @param jobInfos The enumeration jobs to execute. diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobRunner.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobRunner.h index 91f4d4e39c..3078114ef4 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobRunner.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobRunner.h @@ -54,7 +54,7 @@ namespace TestImpact //! Constructs the job runner with the specified parameters common to all job runs of this runner. //! @param maxConcurrentJobs The maximum number of jobs to be in flight at any given time. - TestJobRunner(size_t maxConcurrentJobs); + explicit TestJobRunner(size_t maxConcurrentJobs); protected: //! Runs the specified jobs and returns the completed payloads produced by each job. diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.h index 5545843e35..42b718b241 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactInstrumentedTestRunner.h @@ -54,7 +54,7 @@ namespace TestImpact //! Constructs an instrumented test runner with the specified parameters common to all job runs of this runner. //! @param maxConcurrentRuns The maximum number of runs to be in flight at any given time. - InstrumentedTestRunner(size_t maxConcurrentRuns); + explicit InstrumentedTestRunner(size_t maxConcurrentRuns); //! Executes the specified instrumented test run jobs according to the specified job exception policies. //! @param jobInfos The test run jobs to execute. diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.h index 597ce2d2f8..1fdbc16d58 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/Run/TestImpactTestRunner.h @@ -27,7 +27,7 @@ namespace TestImpact public: //! Constructs a test runner with the specified parameters common to all job runs of this runner. //! @param maxConcurrentRuns The maximum number of runs to be in flight at any given time. - TestRunner(size_t maxConcurrentRuns); + explicit TestRunner(size_t maxConcurrentRuns); //! Executes the specified test run jobs according to the specified job exception policies. //! @param jobInfos The test run jobs to execute.