diff options
Diffstat (limited to 'tools/list_gpu_unit_tests.cpp')
-rw-r--r-- | tools/list_gpu_unit_tests.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/list_gpu_unit_tests.cpp b/tools/list_gpu_unit_tests.cpp new file mode 100644 index 0000000000..18127b6950 --- /dev/null +++ b/tools/list_gpu_unit_tests.cpp @@ -0,0 +1,27 @@ +/* + * Copyright 2018 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <algorithm> +#include <iostream> +#include <string> +#include <vector> + +#include "Test.h" + +int main() { + std::vector<std::string> tests; + for (const skiatest::TestRegistry* r = skiatest::TestRegistry::Head(); r; r = r->next()) { + const skiatest::Test& test = r->factory(); + if (test.needsGpu) { + tests.push_back(std::string(test.name)); + } + } + std::sort(tests.begin(), tests.end()); + for (const std::string& test : tests) { + std::cout << test << '\n'; + } +} |