1 #ifndef _XSTESTDRIVER_HPP
2 #define _XSTESTDRIVER_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program Execution Server
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.
24 *//*--------------------------------------------------------------------*/
27 #include "xsProtocol.hpp"
28 #include "xsTestProcess.hpp"
38 TestDriver (xs::TestProcess* testProcess);
43 void startProcess (const char* name, const char* params, const char* workingDir, const char* caseList);
44 void stopProcess (void);
46 bool poll (ByteBuffer& messageBuffer);
51 STATE_NOT_STARTED = 0,
52 STATE_PROCESS_LAUNCH_FAILED,
53 STATE_PROCESS_STARTED,
54 STATE_PROCESS_RUNNING,
56 STATE_PROCESS_FINISHED,
61 bool pollLogFile (ByteBuffer& messageBuffer);
62 bool pollInfo (ByteBuffer& messageBuffer);
63 bool pollBuffer (ByteBuffer& messageBuffer, MessageType msgType);
65 bool writeMessage (ByteBuffer& messageBuffer, const Message& message);
69 std::string m_lastLaunchFailure;
72 xs::TestProcess* m_process;
73 deUint64 m_lastProcessDataTime;
75 std::vector<deUint8> m_dataMsgTmpBuf;
80 #endif // _XSTESTDRIVER_HPP