mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Spell the "-b" flag fully, as "-bench".
This commit is contained in:
1 parent
84b3e6e5c2
commit
0cba6885fa
3 files changed
+7
-4
No files matched your search
@@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
bench = flag.Bool("b", false, "whether to run benchmarks instead of regular tests")
|
bench = flag.Bool("bench", false, "whether to run benchmarks instead of regular tests")
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -68,7 +68,7 @@ func do(filename string) (failed bool, err error) {
|
|||||||
|
|
||||||
outArgs := []string(nil)
|
outArgs := []string(nil)
|
||||||
if *bench {
|
if *bench {
|
||||||
outArgs = append(outArgs, "-b")
|
outArgs = append(outArgs, "-bench")
|
||||||
}
|
}
|
||||||
outCmd := exec.Command(out, outArgs...)
|
outCmd := exec.Command(out, outArgs...)
|
||||||
outCmd.Stdout = os.Stdout
|
outCmd.Stdout = os.Stdout
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ func benchTestDir(puffsRoot string, dirname string, langs []string, bench bool)
|
|||||||
command := "puffs-test-" + lang
|
command := "puffs-test-" + lang
|
||||||
args := []string(nil)
|
args := []string(nil)
|
||||||
if bench {
|
if bench {
|
||||||
args = append(args, "-b")
|
args = append(args, "-bench")
|
||||||
}
|
}
|
||||||
args = append(args, filepath.Join(puffsRoot, "test", lang, filepath.FromSlash(dirname)))
|
args = append(args, filepath.Join(puffsRoot, "test", lang, filepath.FromSlash(dirname)))
|
||||||
cmd := exec.Command(command, args...)
|
cmd := exec.Command(command, args...)
|
||||||
|
|||||||
@@ -66,8 +66,11 @@ int main(int argc, char** argv) {
|
|||||||
bool bench = false;
|
bool bench = false;
|
||||||
int i;
|
int i;
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if (!strcmp(argv[i], "-b")) {
|
if (!strcmp(argv[i], "-bench")) {
|
||||||
bench = true;
|
bench = true;
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "unknown flag \"%s\"\n", argv[i]);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user