Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: client/deps/glbench/src/teartest.cc

Issue 2031007: Do not ask user to press Fail button if pixmap to texture test fails because GLX is older than 1.3. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | client/deps/glbench/src/teartest_glx.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 <gflags/gflags.h> 5 #include <gflags/gflags.h>
6 #include <map> 6 #include <map>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <time.h> 10 #include <time.h>
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 test_map["pixmap_to_texture"] = GetPixmapToTextureTestEGL(); 208 test_map["pixmap_to_texture"] = GetPixmapToTextureTestEGL();
209 #else 209 #else
210 test_map["pixmap_to_texture"] = GetPixmapToTextureTest(); 210 test_map["pixmap_to_texture"] = GetPixmapToTextureTest();
211 #endif 211 #endif
212 212
213 SwapInterval(sleep_duration ? 0 : 1); 213 SwapInterval(sleep_duration ? 0 : 1);
214 214
215 std::vector<std::string> tests; 215 std::vector<std::string> tests;
216 SplitString(FLAGS_tests, ',', &tests); 216 SplitString(FLAGS_tests, ',', &tests);
217 217
218 int return_code = 0;
218 for (std::vector<std::string>::iterator it = tests.begin(); 219 for (std::vector<std::string>::iterator it = tests.begin();
219 it != tests.end(); 220 it != tests.end();
220 it++) 221 it++)
221 { 222 {
222 Test* t = test_map[*it]; 223 Test* t = test_map[*it];
223 if (!t || !t->Start()) 224 if (!t || !t->Start()) {
225 return_code = 1;
224 continue; 226 continue;
227 }
225 228
226 Bool got_event = False; 229 Bool got_event = False;
227 uint64_t wait_until = GetUTime() + 1000000ULL * FLAGS_seconds_to_run; 230 uint64_t wait_until = GetUTime() + 1000000ULL * FLAGS_seconds_to_run;
228 for (int x = 0; 231 for (int x = 0;
229 !got_event && GetUTime() < wait_until; 232 !got_event && GetUTime() < wait_until;
230 x = (x + 4) % (2 * g_width)) 233 x = (x + 4) % (2 * g_width))
231 { 234 {
232 const int shift = x < g_width ? x : 2 * g_width - x; 235 const int shift = x < g_width ? x : 2 * g_width - x;
233 236
234 t->Loop(shift); 237 t->Loop(shift);
(...skipping 11 matching lines...) Expand all
246 KeyPressMask, &event); 249 KeyPressMask, &event);
247 } 250 }
248 251
249 t->Stop(); 252 t->Stop();
250 } 253 }
251 254
252 // TODO: cleaner teardown. 255 // TODO: cleaner teardown.
253 256
254 glDeleteTextures(1, &texture); 257 glDeleteTextures(1, &texture);
255 DestroyContext(); 258 DestroyContext();
256 return 0; 259 return return_code;
257 } 260 }
OLDNEW
« no previous file with comments | « no previous file | client/deps/glbench/src/teartest_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698