OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/khronos_glcts_support/khronos_glcts_test.h" | 5 #include "gpu/khronos_glcts_support/khronos_glcts_test.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 base::FilePath test_path; | 60 base::FilePath test_path; |
61 PathService::Get(base::DIR_EXE, &test_path); | 61 PathService::Get(base::DIR_EXE, &test_path); |
62 base::FilePath archive(test_path.Append(FILE_PATH_LITERAL( | 62 base::FilePath archive(test_path.Append(FILE_PATH_LITERAL( |
63 "khronos_glcts_data"))); | 63 "khronos_glcts_data"))); |
64 base::FilePath program(test_path.Append(FILE_PATH_LITERAL( | 64 base::FilePath program(test_path.Append(FILE_PATH_LITERAL( |
65 "khronos_glcts_test_windowless"))); | 65 "khronos_glcts_test_windowless"))); |
66 base::FilePath log = | 66 base::FilePath log = |
67 g_deqp_log_dir.AppendASCII(test_info->name()). | 67 g_deqp_log_dir.AppendASCII(test_info->name()). |
68 AddExtension(FILE_PATH_LITERAL(".log")); | 68 AddExtension(FILE_PATH_LITERAL(".log")); |
69 | 69 |
70 CommandLine cmdline(program); | 70 base::CommandLine cmdline(program); |
71 cmdline.AppendSwitchPath("--deqp-log-filename", log); | 71 cmdline.AppendSwitchPath("--deqp-log-filename", log); |
72 cmdline.AppendSwitchPath("--deqp-archive-dir", archive); | 72 cmdline.AppendSwitchPath("--deqp-archive-dir", archive); |
73 cmdline.AppendArg("--deqp-gl-config-id=-1"); | 73 cmdline.AppendArg("--deqp-gl-config-id=-1"); |
74 cmdline.AppendArg(std::string("--deqp-case=") + test_name); | 74 cmdline.AppendArg(std::string("--deqp-case=") + test_name); |
75 | 75 |
76 std::string output; | 76 std::string output; |
77 bool success = base::GetAppOutput(cmdline, &output); | 77 bool success = base::GetAppOutput(cmdline, &output); |
78 if (success) { | 78 if (success) { |
79 size_t success_index = output.find("Pass (Pass)"); | 79 size_t success_index = output.find("Pass (Pass)"); |
80 size_t failed_index = output.find("Fail (Fail)"); | 80 size_t failed_index = output.find("Fail (Fail)"); |
(...skipping 14 matching lines...) Expand all Loading... |
95 if (argc == 2) { | 95 if (argc == 2) { |
96 g_deqp_log_dir = base::FilePath::FromUTF8Unsafe(argv[1]); | 96 g_deqp_log_dir = base::FilePath::FromUTF8Unsafe(argv[1]); |
97 } | 97 } |
98 else { | 98 else { |
99 base::GetTempDir(&g_deqp_log_dir); | 99 base::GetTempDir(&g_deqp_log_dir); |
100 } | 100 } |
101 | 101 |
102 return RUN_ALL_TESTS(); | 102 return RUN_ALL_TESTS(); |
103 } | 103 } |
104 | 104 |
OLD | NEW |