| // Copyright 2009 The RE2 Authors. All Rights Reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| #include <sys/resource.h> |
| DEFINE_string(test_tmpdir, "/var/tmp", "temp directory"); |
| static Test tests[10000]; |
| void RegisterTest(void (*fn)(void), const char *name) { |
| tests[ntests++].name = name; |
| int64 VirtualProcessSize() { |
| getrusage(RUSAGE_SELF, &ru); |
| return (int64)ru.ru_maxrss*1024; |
| int main(int argc, char **argv) { |
| for (int i = 0; i < ntests; i++) { |
| printf("%s\n", tests[i].name); |