|
|
|
@ -8,7 +8,7 @@ namespace fuc2 { |
|
|
|
Options result; |
|
|
|
Options result; |
|
|
|
|
|
|
|
|
|
|
|
int opt = 0; |
|
|
|
int opt = 0; |
|
|
|
while((opt = getopt(argc, argv, "fvn:")) != -1) { |
|
|
|
while((opt = getopt(argc, argv, "fvm:")) != -1) { |
|
|
|
switch(opt) { |
|
|
|
switch(opt) { |
|
|
|
case 'f': |
|
|
|
case 'f': |
|
|
|
result.fail_fast = true; |
|
|
|
result.fail_fast = true; |
|
|
|
@ -16,7 +16,7 @@ namespace fuc2 { |
|
|
|
case 'v': |
|
|
|
case 'v': |
|
|
|
result.verbose = true; |
|
|
|
result.verbose = true; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'n': |
|
|
|
case 'm': |
|
|
|
result.matching = std::string(optarg); |
|
|
|
result.matching = std::string(optarg); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -86,6 +86,11 @@ namespace fuc2 { |
|
|
|
auto opts = parse_options(argc, argv); |
|
|
|
auto opts = parse_options(argc, argv); |
|
|
|
|
|
|
|
|
|
|
|
for(auto& test : tests) { |
|
|
|
for(auto& test : tests) { |
|
|
|
|
|
|
|
// skip everything except ones matching the name
|
|
|
|
|
|
|
|
if(!test.name.contains(opts.matching)) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fail_count += run(test, opts, argc > 1); |
|
|
|
fail_count += run(test, opts, argc > 1); |
|
|
|
|
|
|
|
|
|
|
|
if(opts.fail_fast && fail_count > 0) { |
|
|
|
if(opts.fail_fast && fail_count > 0) { |
|
|
|
|