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 Tester application.
25 * Platform port (see tcuPlatform.hpp) must create App and issue calls to
26 * App::iterate() until it signals that test execution is completed.
27 *//*--------------------------------------------------------------------*/
29 #include "tcuDefs.hpp"
30 #include "qpWatchDog.h"
31 #include "qpCrashHandler.h"
32 #include "deMutex.hpp"
40 class TestSessionExecutor;
43 class TestPackageRoot;
45 /*--------------------------------------------------------------------*//*!
46 * \brief Test application
48 * Test application encapsulates full test execution logic. Platform port
49 * must create App object and repeately call iterate() until it returns
52 * On systems where main loop is not in control of application (such as
53 * Android or iOS) iterate() should be called in application update/draw
56 * App is responsible of setting up crash handler (qpCrashHandler) and
57 * watchdog (qpWatchDog).
59 * See tcuMain.cpp for an example on how to implement application stub.
60 *//*--------------------------------------------------------------------*/
64 App (Platform& platform, Archive& archive, TestLog& log, const CommandLine& cmdLine);
72 void onWatchdogTimeout (void);
75 static void onWatchdogTimeout (qpWatchDog* watchDog, void* userPtr);
76 static void onCrash (qpCrashHandler* crashHandler, void* userPtr);
79 qpWatchDog* m_watchDog;
80 qpCrashHandler* m_crashHandler;
81 de::Mutex m_crashLock;
84 TestContext* m_testCtx;
85 TestPackageRoot* m_testRoot;
86 TestSessionExecutor* m_testExecutor;