Go test support race detection via the -race flag, this Diffusion enhance the
Go test result parser to correctly parse the race detection.
Details
Details
- Reviewers
- None
- Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T6867: Add linter and unit test engine for Go(lang)
Unit test
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- go-unit-race-engine
- Lint
Lint Errors Severity Location Code Message Error src/unit/parser/__tests__/testresults/go.race-warning-test-case-failure-go1.4:27 TXT2 Tab Literal Error src/unit/parser/__tests__/testresults/go.race-warning-test-case-success-go1.4:28 TXT2 Tab Literal - Unit
Tests Passed - Build Status
Buildable 5575 Build 5594: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
Go test is sending the output of the racer to STDERR while sending the rest to STDOUT, so the format seen by exec_manual is not the same as seen on the terminal.
wmn@cratos /tmp/test_arc [master *] ± % go test -race -v ./ > /dev/null ================== WARNING: DATA RACE Write by goroutine 7: _/tmp/test_arc.func·002() /tmp/test_arc/arc_test.go:13 +0x3a Previous write by goroutine 6: _/tmp/test_arc.func·001() /tmp/test_arc/arc_test.go:9 +0x3a Goroutine 7 (running) created at: _/tmp/test_arc.TestShouldNotPassRaceTest() /tmp/test_arc/arc_test.go:14 +0x133 testing.tRunner() /usr/local/Cellar/go/1.4.2/libexec/src/testing/testing.go:447 +0x133 Goroutine 6 (finished) created at: _/tmp/test_arc.TestShouldNotPassRaceTest() /tmp/test_arc/arc_test.go:10 +0xc0 testing.tRunner() /usr/local/Cellar/go/1.4.2/libexec/src/testing/testing.go:447 +0x133 ================== wmn@cratos /tmp/test_arc [master *] ± % go test -race -v ./ 2> /dev/null === RUN TestShouldNotPassRaceTest --- PASS: TestShouldNotPassRaceTest (0.00s) PASS ok _/tmp/test_arc 0.009s