This is mostly for convenient local testing.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1587043009
Review URL: https://codereview.chromium.org/
1587043009
int main(int argc, char** argv) {
SkCommandLineFlags::Parse(argc, argv);
- if (FLAGS_bytes.isEmpty()) {
- SkDebugf("Usage: %s -b <path/to/fuzzed.data> [-m pattern]\n", argv[0]);
- return 1;
- }
- SkAutoTUnref<SkData> bytes(SkData::NewFromFileName(FLAGS_bytes[0]));
+ const char* path = FLAGS_bytes.isEmpty() ? argv[0] : FLAGS_bytes[0];
+ SkAutoTUnref<SkData> bytes(SkData::NewFromFileName(path));
for (auto r = SkTRegistry<Fuzzable>::Head(); r; r = r->next()) {
auto fuzzable = r->factory();