mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 08:47:28 +01:00
Let test binaries run from any dir in the repo
Also spin out generate.WuffsRoot into its own package.
This commit is contained in:
1 parent
e2d1f8e0c2
commit
3854ce3e89
13 files changed
+208
-147
No files matched your search
+5
-1
@@ -24,6 +24,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/google/wuffs/lang/wuffsroot"
|
||||
|
||||
cf "github.com/google/wuffs/cmd/commonflags"
|
||||
)
|
||||
|
||||
@@ -132,7 +134,9 @@ func doBenchTest1(filename string, bench bool, ccompilers string, focus string,
|
||||
outCmd := exec.Command(out, outArgs...)
|
||||
outCmd.Stdout = os.Stdout
|
||||
outCmd.Stderr = os.Stderr
|
||||
outCmd.Dir = filepath.Dir(filename)
|
||||
if outCmd.Dir, err = wuffsroot.Value(); err != nil {
|
||||
return false, err
|
||||
}
|
||||
if err := outCmd.Run(); err == nil {
|
||||
// No-op.
|
||||
} else if _, ok := err.(*exec.ExitError); ok {
|
||||
|
||||
Reference in new issue
Block a user