mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-25 17:45:39 +00:00
Vincent Batts
f49f66f61e
This cleans up the Makefile target, and drops the dependency to point to the $root path of the repo. Fixes https://github.com/vbatts/go-mtree/issues/98 Reported-by: Aleksa Sarai <asarai@suse.de> Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
26 lines
352 B
Go
26 lines
352 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
"os/exec"
|
|
)
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
|
|
failed := 0
|
|
for _, arg := range flag.Args() {
|
|
cmd := exec.Command("bash", arg)
|
|
cmd.Stderr = os.Stderr
|
|
cmd.Stdout = os.Stdout
|
|
if err := cmd.Run(); err != nil {
|
|
failed++
|
|
}
|
|
}
|
|
if failed > 0 {
|
|
fmt.Printf("%d FAILED tests\n", failed)
|
|
os.Exit(1)
|
|
}
|
|
}
|