func main() {
os.Exit(XsaMain(os.Args))
}
+
+func MainHarness(args ...string) int {
+ x := append([]string{"xsatool"}, args...)
+ return XsaMain(x)
+}
if callRepoInit {
// Initialize a current version of the repo
- args := []string{"xsatool", "repo", "init"}
- if ret := XsaMain(args); ret != 0 {
- t.Errorf("Command %v failed: %d\n", args, ret)
+ if ret := MainHarness("repo", "init"); ret != 0 {
+ t.Errorf("repo init failed: %d\n", ret)
return false
}
} else {
// Read existing version of repos
- args := []string{"xsatool", "repo", "info"}
- if ret := XsaMain(args); ret != 0 {
- t.Errorf("Command %v failed: %d\n", args, ret)
+ if ret := MainHarness("repo", "info"); ret != 0 {
+ t.Errorf("repo info failed: %d\n", ret)
return false
}
}