1 /* 2 * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef _ACTSAPP_HPP 17 #define _ACTSAPP_HPP 18 19 #include "tcuDefs.hpp" 20 #include "qpWatchDog.h" 21 #include "qpCrashHandler.h" 22 #include "deMutex.hpp" 23 #include "tcuTestSessionExecutor.hpp" 24 #include "tcuTestPackage.hpp" 25 26 namespace tcu { 27 enum class EWATCHDOG { 28 WATCHDOG_TOTAL_TIME_LIMIT_SECS = 300, 29 WATCHDOG_INTERVAL_TIME_LIMIT_SECS = 30 30 }; 31 32 class ActsApp { 33 public: 34 ActsApp (Platform& platform, Archive& archive, TestLog& log, const CommandLine& cmdLine); 35 virtual ~ActsApp (void); 36 37 bool iterate (void); 38 const TestRunStatus& getResult (void) const; 39 40 protected: 41 void cleanup (void); 42 43 Platform& m_platform; 44 qpWatchDog* m_watchDog; 45 qpCrashHandler* m_crashHandler; 46 de::Mutex m_crashLock; 47 bool m_crashed; 48 49 TestContext* m_testCtx; 50 TestPackageRoot* m_testRoot; 51 TestSessionExecutor* m_sessionExecutor; 52 }; 53 } // tcu 54 #endif // _ACTSAPP_HPP