Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
mtodzo committed Dec 4, 2020
1 parent b0c1991 commit 72b0a29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions run_bin.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func PostExec(cmdFuncs ...CmdFunc) CoverageCollectorOption {
}

// RunBinary runs the instrumented binary at binPath with env environment variables, executing only the test with mainTestName with the specified args.
func (c *CoverageCollector) RunBinary(binPath string, mainTestName string, env []string, args []string, options ... CoverageCollectorOption) (output string, exitCode int, err error) {
func (c *CoverageCollector) RunBinary(binPath string, mainTestName string, env []string, args []string, options ...CoverageCollectorOption) (output string, exitCode int, err error) {
if !c.setupFinished {
panic("RunBinary called before Setup")
}
Expand Down Expand Up @@ -238,4 +238,4 @@ func removeTempCoverageFile(name string) {
func haveTestsToRun(output string) bool {
prefix := "testing: warning: no tests to run"
return !strings.HasPrefix(output, prefix)
}
}
4 changes: 0 additions & 4 deletions run_bin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,6 @@ func TestCoverageCollector_RunBinary(t *testing.T) {
args: args{
binPath: "./test_bins/read_stdin.sh",
mainTestName: "",
env: nil,
args: nil,
},
fields: fields{
MergedCoverageFilename: "temp_coverage.out",
Expand All @@ -612,8 +610,6 @@ func TestCoverageCollector_RunBinary(t *testing.T) {
args: args{
binPath: "./test_bins/read_stdin.sh",
mainTestName: "",
env: nil,
args: nil,
},
fields: fields{
MergedCoverageFilename: "temp_coverage.out",
Expand Down
2 changes: 1 addition & 1 deletion test_bins/read_stdin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ do
done < /dev/stdin
echo START_BINCOVER_METADATA
echo "{\"cover_mode\":\"\",\"exit_code\":1}"
echo END_BINCOVER_METADATA
echo END_BINCOVER_METADATA

0 comments on commit 72b0a29

Please sign in to comment.