[benchmark-shape] Allow taking multiple tests from cmdline

This commit is contained in:
Behdad Esfahbod 2022-05-21 15:11:53 -06:00
parent 1bf2d5f885
commit e1f4445dff
1 changed files with 7 additions and 5 deletions

View File

@ -105,12 +105,14 @@ int main(int argc, char** argv)
if (argc > 2) if (argc > 2)
{ {
num_tests = 1; num_tests = (argc - 1) / 2;
tests = (test_input_t *) calloc (num_tests, sizeof (test_input_t)); tests = (test_input_t *) calloc (num_tests, sizeof (test_input_t));
for (unsigned i = 0; i < num_tests; i++)
tests[0].is_variable = true; {
tests[0].text_path = argv[1]; tests[i].is_variable = true;
tests[0].font_path = argv[2]; tests[i].text_path = argv[1 + i * 2];
tests[i].font_path = argv[2 + i * 2];
}
} }
for (unsigned i = 0; i < num_tests; i++) for (unsigned i = 0; i < num_tests; i++)