-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick #7766 to 6.x: Add goTestUnit and goTestIntegration to mag…
…efile (#8294) * Add goTestUnit and goTestIntegration to magefile Consider these targets as incubating. They are not used by any of the Makefiles yet. I added it to the Windows CI only to start testing it out and to resolve an issue where compilation could fail and success would be reported by the powershell script. ``` $ mage -h goTestUnit mage gotestunit: GoTestUnit executes the Go unit tests. Use TEST_COVERAGE=true to enable code coverage profiling. Use RACE_DETECTOR=true to enable the race detector. ``` ``` $ TEST_COVERAGE=true RACE_DETECTOR=true mage goTestUnit >> go test: Unit Testing SUMMARY: Fail: 0 Skip: 2 Pass: 807 Packages: 70 Duration: 21.459313277s Coverage Report: /Users/akroh/go/src/github.com/elastic/beats/libbeat/build/TEST-go-unit.html JUnit Report: /Users/akroh/go/src/github.com/elastic/beats/libbeat/build/TEST-go-unit.xml Output File: /Users/akroh/go/src/github.com/elastic/beats/libbeat/build/TEST-go-unit.out >> go test: Unit Test Passed ``` ``` $ TEST_COVERAGE=true RACE_DETECTOR=true mage goTestUnit >> go test: Unit Testing FAILURES: Package: github.com/elastic/beats/libbeat/processors Test: TestDemo processor_test.go:36: Only failing tests are logged. But you can use 'mage -v goTestUnit' to see all of the go test output or just view the output file list in the summary. ---- SUMMARY: Fail: 1 Skip: 2 Pass: 807 Packages: 70 Duration: 21.53730358s Coverage Report: /Users/akroh/go/src/github.com/elastic/beats/libbeat/build/TEST-go-unit.html JUnit Report: /Users/akroh/go/src/github.com/elastic/beats/libbeat/build/TEST-go-unit.xml Output File: /Users/akroh/go/src/github.com/elastic/beats/libbeat/build/TEST-go-unit.out >> go test: Unit Test Failed Error: go test failed: 1 test failures $ echo $? 1 ``` (cherry picked from commit f52f069) * Add github.com/jstemmer/go-junit-report to vendor (cherry picked from commit 5f05ac7)
- Loading branch information
1 parent
865a90a
commit fb37318
Showing
21 changed files
with
1,133 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.