1 #ifndef _TCUTESTSESSIONEXECUTOR_HPP
2 #define _TCUTESTSESSIONEXECUTOR_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program Tester Core
5 * ----------------------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Test executor.
24 *//*--------------------------------------------------------------------*/
26 #include "tcuDefs.hpp"
27 #include "tcuTestContext.hpp"
28 #include "tcuTestCase.hpp"
29 #include "tcuTestPackage.hpp"
30 #include "tcuTestHierarchyIterator.hpp"
31 #include "deUniquePtr.hpp"
40 TestRunStatus (void) { clear(); }
52 int numExecuted; //!< Total number of cases executed.
53 int numPassed; //!< Number of cases passed.
54 int numFailed; //!< Number of cases failed.
55 int numNotSupported; //!< Number of cases not supported.
56 int numWarnings; //!< Number of QualityWarning / CompatibilityWarning results.
57 bool isComplete; //!< Is run complete.
60 class TestSessionExecutor
63 TestSessionExecutor (TestPackageRoot& root, TestContext& testCtx);
64 ~TestSessionExecutor(void);
68 bool isInTestCase (void) const { return m_isInTestCase; }
69 const TestRunStatus& getStatus (void) const { return m_status; }
72 void enterTestPackage (TestPackage* testPackage);
73 void leaveTestPackage (TestPackage* testPackage);
75 bool enterTestCase (TestCase* testCase, const std::string& casePath);
76 TestCase::IterateResult iterateTestCase (TestCase* testCase);
77 void leaveTestCase (TestCase* testCase);
81 STATE_TRAVERSE_HIERARCHY = 0,
82 STATE_EXECUTE_TEST_CASE,
87 TestContext& m_testCtx;
89 DefaultHierarchyInflater m_inflater;
90 TestHierarchyIterator m_iterator;
92 de::MovePtr<TestCaseExecutor> m_caseExecutor;
93 TestRunStatus m_status;
97 deUint64 m_testStartTime;
102 #endif // _TCUTESTSESSIONEXECUTOR_HPP