@@ -1265,7 +1265,7 @@ func (p *Package) buildGo(buildctx *buildContext, wd, result string) (res *packa
1265
1265
testCommand = append (testCommand , fmt .Sprintf ("-coverprofile=%v" , codecovComponentName (p .FullName ())))
1266
1266
} else {
1267
1267
testCommand = append (testCommand , "-coverprofile=testcoverage.out" )
1268
- reportCoverage = collectGoTestCoverage (filepath .Join (wd , "testcoverage.out" ), p . FullName () )
1268
+ reportCoverage = collectGoTestCoverage (filepath .Join (wd , "testcoverage.out" ))
1269
1269
}
1270
1270
testCommand = append (testCommand , "./..." )
1271
1271
@@ -1300,7 +1300,7 @@ func (p *Package) buildGo(buildctx *buildContext, wd, result string) (res *packa
1300
1300
}, nil
1301
1301
}
1302
1302
1303
- func collectGoTestCoverage (covfile , fullName string ) testCoverageFunc {
1303
+ func collectGoTestCoverage (covfile string ) testCoverageFunc {
1304
1304
return func () (coverage , funcsWithoutTest , funcsWithTest int , err error ) {
1305
1305
// We need to collect the coverage for all packages in the module.
1306
1306
// To that end we load the coverage file.
@@ -1680,6 +1680,7 @@ func executeCommandsForPackage(buildctx *buildContext, p *Package, wd string, co
1680
1680
}
1681
1681
1682
1682
env := append (os .Environ (), p .Environment ... )
1683
+ env = append (env , fmt .Sprintf ("LEEWAY_WORKSPACE_ROOT=%s" , p .C .W .Origin ))
1683
1684
for _ , cmd := range commands {
1684
1685
err := run (buildctx .Reporter , p , env , wd , cmd [0 ], cmd [1 :]... )
1685
1686
if err != nil {
0 commit comments