1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 #include "base/at_exit.h"
8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h"
11 #include "third_party/khronos_glcts/framework/common/tcuApp.hpp"
12 #include "third_party/khronos_glcts/framework/common/tcuCommandLine.hpp"
13 #include "third_party/khronos_glcts/framework/common/tcuDefs.hpp"
14 #include "third_party/khronos_glcts/framework/common/tcuPlatform.hpp"
15 #include "third_party/khronos_glcts/framework/common/tcuResource.hpp"
16 #include "third_party/khronos_glcts/framework/common/tcuTestLog.hpp"
17 #include "third_party/khronos_glcts/framework/delibs/decpp/deUniquePtr.hpp"
19 // implemented in the native platform
20 tcu::Platform
* createPlatform ();
22 void GTFMain(int argc
, char* argv
[]) {
23 setvbuf(stdout
, DE_NULL
, _IOLBF
, 4*1024);
26 tcu::CommandLine
cmdLine(argc
, argv
);
27 tcu::DirArchive
archive(cmdLine
.getArchiveDir());
28 tcu::TestLog
log(cmdLine
.getLogFileName(), cmdLine
.getLogFlags());
29 de::UniquePtr
<tcu::Platform
> platform(createPlatform());
30 de::UniquePtr
<tcu::App
> app(
31 new tcu::App(*platform
, archive
, log
, cmdLine
));
39 catch (const std::exception
& e
) {
40 tcu::die("%s", e
.what());
44 int main(int argc
, char *argv
[]) {
45 base::AtExitManager at_exit
;
46 base::CommandLine::Init(argc
, argv
);
47 base::MessageLoopForUI message_loop
;