From 626190f7c51fbdd2a1766ee448fa6cfb507804d7 Mon Sep 17 00:00:00 2001 From: risk danger olson Date: Tue, 27 Oct 2015 07:03:18 -0600 Subject: [PATCH] add debugging --- script/integration.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/script/integration.go b/script/integration.go index 968987e7..abfb32ed 100644 --- a/script/integration.go +++ b/script/integration.go @@ -11,12 +11,17 @@ import ( ) var ( + debugging = false erroring = false maxprocs = 4 testPattern = regexp.MustCompile(`test/test-([a-z\-]+)\.sh$`) ) func mainIntegration() { + if len(os.Getenv("DEBUG")) > 0 { + debugging = true + } + if maxprocs < 1 { maxprocs = 1 } @@ -111,9 +116,16 @@ func testFiles() []string { func allTestFiles() []string { files := make([]string, 0, 100) filepath.Walk("test", func(path string, info os.FileInfo, err error) error { + if debugging { + fmt.Println("FOUND:", path) + } if err != nil || info.IsDir() || !testPattern.MatchString(path) { return nil } + + if debugging { + fmt.Println("MATCHING:", path) + } files = append(files, path) return nil })