Skip to content

Commit db075ba

Browse files
committed
fix test and docs
1 parent 6ecdd52 commit db075ba

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

test/errors_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ErrorsAppName = "errorstest"
2323

2424
func TestRunErrors(t *testing.T) {
2525
UseApp(ErrorsAppName)
26-
RunInstrument(t, UseTestRules("test_error.json"), "-debuglog")
26+
RunInstrument(t, UseTestRules("test_error.json"), "-debuglog", "go", "build")
2727
stdout, stderr := RunApp(t, ErrorsAppName)
2828
ExpectContains(t, stdout, "wow")
2929
ExpectContains(t, stdout, "old:wow")

test/flags_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ func TestFlags(t *testing.T) {
3333
RunInstrumentFallible(t, "-debuglog", "go", "build", "notevenaflag")
3434
ExpectPreprocessContains(t, shared.DebugLogFile, "failed to")
3535

36-
RunInstrument(t, "-debuglog", "-verbose",
37-
"go", "build",
36+
RunInstrument(t, "-debuglog", "-verbose", "go", "build",
3837
`-ldflags=-X main.Placeholder=replaced`)
3938
_, stderr := RunApp(t, AppName)
4039
ExpectContains(t, stderr, "placeholder:replaced")

test/helloworld_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ const HelloworldAppName = "helloworld"
2727
func TestRunHelloworld(t *testing.T) {
2828
UseApp(HelloworldAppName)
2929

30-
RunInstrument(t, "-debuglog") // no test rules, build as usual
30+
RunInstrument(t, "-debuglog", "go", "build") // no test rules, build as usual
3131
stdout, _ := RunApp(t, HelloworldAppName)
3232
ExpectContains(t, stdout, "helloworld")
3333

34-
RunInstrument(t, UseTestRules("test_fmt.json"), "-debuglog")
34+
RunInstrument(t, UseTestRules("test_fmt.json"), "-debuglog", "go", "build")
3535
stdout, stderr := RunApp(t, HelloworldAppName)
3636
ExpectContains(t, stdout, "olleH")
3737
ExpectContains(t, stderr, "Entering hook1") // println writes to stderr
@@ -56,7 +56,7 @@ func TestRunHelloworld(t *testing.T) {
5656
func TestBuildHelloworldWithVendor1(t *testing.T) {
5757
UseApp(HelloworldAppName)
5858
util.RunCmd("go", "mod", "vendor")
59-
RunInstrument(t, "-debuglog")
59+
RunInstrument(t, "-debuglog", "go", "build")
6060
}
6161

6262
func TestBuildHelloworldWithVendor2(t *testing.T) {

test/httpclient_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestRunHttpclient(t *testing.T) {
2424
UseApp(HttpclientAppName)
2525

2626
RunInstrument(t, UseTestRules("test_nethttp.json"),
27-
"-debuglog", "-verbose")
27+
"-debuglog", "-verbose", "go", "build")
2828
_, stderr := RunApp(t, HttpclientAppName)
2929
ExpectContains(t, stderr, "Client.Do()") // println writes to stderr
3030
ExpectContains(t, stderr, "failed to exec onExit hook") // intentional panic

0 commit comments

Comments
 (0)