OLD | NEW |
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 <fcntl.h> | 5 #include <fcntl.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <sys/mman.h> | 9 #include <sys/mman.h> |
10 | 10 |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 test_name_arg = true; | 597 test_name_arg = true; |
598 } else if (strcmp("-d", argv[i]) == 0) { | 598 } else if (strcmp("-d", argv[i]) == 0) { |
599 duration_arg = true; | 599 duration_arg = true; |
600 } | 600 } |
601 } | 601 } |
602 *enabled_tests_ptr++ = NULL; | 602 *enabled_tests_ptr++ = NULL; |
603 } | 603 } |
604 | 604 |
605 | 605 |
606 int main(int argc, char *argv[]) { | 606 int main(int argc, char *argv[]) { |
| 607 SetBasePathFromArgv0(argv[0], "src"); |
607 ParseArgs(argc, argv); | 608 ParseArgs(argc, argv); |
608 if (!Init()) { | 609 if (!Init()) { |
609 printf("# Failed to initialize.\n"); | 610 printf("# Failed to initialize.\n"); |
610 return 1; | 611 return 1; |
611 } | 612 } |
612 | 613 |
613 void (*test[])() = { | 614 void (*test[])() = { |
614 SwapTest, | 615 SwapTest, |
615 ClearTest, | 616 ClearTest, |
616 FillRateTest, | 617 FillRateTest, |
(...skipping 11 matching lines...) Expand all Loading... |
628 test[i](); | 629 test[i](); |
629 GLenum err = glGetError(); | 630 GLenum err = glGetError(); |
630 if (err != 0) | 631 if (err != 0) |
631 printf("# glGetError returned non-zero: 0x%x\n", err); | 632 printf("# glGetError returned non-zero: 0x%x\n", err); |
632 DestroyContext(); | 633 DestroyContext(); |
633 } | 634 } |
634 } while (GetUTime() < done); | 635 } while (GetUTime() < done); |
635 | 636 |
636 return 0; | 637 return 0; |
637 } | 638 } |
OLD | NEW |