mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Fix some error messages for "puffs bench".
This commit is contained in:
1 parent
6a34375cb3
commit
a29dcb92db
2 files changed
+10
-3
No files matched your search
@@ -38,7 +38,11 @@ func main1() error {
|
||||
failed = failed || f
|
||||
}
|
||||
if failed {
|
||||
return fmt.Errorf("%s: some tests failed", os.Args[0])
|
||||
s := "tests"
|
||||
if *bench {
|
||||
s = "benchmarks"
|
||||
}
|
||||
return fmt.Errorf("%s: some %s failed", os.Args[0], s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+5
-2
@@ -4,7 +4,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
@@ -60,7 +59,11 @@ func doBenchTest(puffsRoot string, args []string, bench bool) error {
|
||||
failed = failed || f
|
||||
}
|
||||
if failed {
|
||||
return errors.New("puffs test: some tests failed")
|
||||
s0, s1 := "test", "tests"
|
||||
if bench {
|
||||
s0, s1 = "bench", "benchmarks"
|
||||
}
|
||||
return fmt.Errorf("puffs %s: some %s failed", s0, s1)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user