Skip to content

Commit

Permalink
Fix some output formatting, fix missing -d flag, add token to conf (l…
Browse files Browse the repository at this point in the history
…ater)
  • Loading branch information
shaseley committed Feb 11, 2016
1 parent 16f104f commit 0c081b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions test161/conf.go
Expand Up @@ -9,6 +9,7 @@ const CONF_FILE = ".test161.conf"

type ClientConf struct {
Repo string `yaml:"repo"`
Token string `yaml:"token"`
Ids []string `yaml:"ids"`
RootDir string `yaml:"rootdir"`
TargetDir string `yaml:"targetdir"`
Expand Down
22 changes: 17 additions & 5 deletions test161/runcmd.go
Expand Up @@ -67,7 +67,7 @@ func getRunArgs() error {
runFlags.BoolVar(&runCommandVars.sequential, "sequential", false, "")
runFlags.BoolVar(&runCommandVars.sequential, "s", false, "")
runFlags.BoolVar(&runCommandVars.deps, "dependencies", false, "")
runFlags.BoolVar(&runCommandVars.deps, "", false, "")
runFlags.BoolVar(&runCommandVars.deps, "d", false, "")
runFlags.StringVar(&runCommandVars.verbose, "verbose", "loud", "")
runFlags.StringVar(&runCommandVars.verbose, "v", "loud", "")
runFlags.BoolVar(&runCommandVars.isTag, "tag", false, "")
Expand Down Expand Up @@ -180,10 +180,17 @@ func runTestGroup(tg *test161.TestGroup, useDeps bool) {
}
}

fmt.Printf("\nTotal Correct : %v/%v\n", totals[0], len(tg.Tests))
fmt.Printf("Total Incorrect: %v/%v\n", totals[1], len(tg.Tests))
fmt.Printf("Total Aborted : %v/%v\n", totals[2], len(tg.Tests))
fmt.Printf("Total Skipped : %v/%v\n", totals[3], len(tg.Tests))
desc := []string{"Total Correct", "Total Incorrect",
"Total Aborted", "Total Skipped",
}

fmt.Println()

for i := 0; i < len(desc); i++ {
if i == 0 || totals[i] > 0 {
fmt.Printf("%-15v: %v/%v\n", desc[i], totals[i], len(tg.Tests))
}
}

if totalAvail > 0 {
fmt.Printf("\nTotal Score : %v/%v\n", totalPoints, totalAvail)
Expand Down Expand Up @@ -254,6 +261,8 @@ func printDryRun(tg *test161.TestGroup) {
sort.Sort(testsByID(deps))
sort.Sort(testsByID(tests))

fmt.Println()

if len(deps) > 0 {
for _, test := range deps {
fmt.Printf("%-30v (dependency)\n", test.DependencyID)
Expand All @@ -266,4 +275,7 @@ func printDryRun(tg *test161.TestGroup) {
fmt.Println(test.DependencyID)
}
}

fmt.Println()

}

0 comments on commit 0c081b1

Please sign in to comment.