@@ -583,6 +583,9 @@ var GoBuildFlags = GinkgoFlags{
583
583
Usage : "print the name of the temporary work directory and do not delete it when exiting." },
584
584
{KeyPath : "Go.X" , Name : "x" , SectionKey : "go-build" ,
585
585
Usage : "print the commands." },
586
+ }
587
+
588
+ var GoBuildOFlags = GinkgoFlags {
586
589
{KeyPath : "Go.O" , Name : "o" , SectionKey : "go-build" ,
587
590
Usage : "output binary path (including name)." },
588
591
}
@@ -683,7 +686,7 @@ func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, packageToBuild strin
683
686
684
687
args := []string {"test" , "-c" , packageToBuild }
685
688
goArgs , err := GenerateFlagArgs (
686
- GoBuildFlags ,
689
+ GoBuildFlags . CopyAppend ( GoBuildOFlags ... ) ,
687
690
map [string ]any {
688
691
"Go" : & goFlagsConfig ,
689
692
},
@@ -773,6 +776,7 @@ func BuildWatchCommandFlagSet(suiteConfig *SuiteConfig, reporterConfig *Reporter
773
776
func BuildBuildCommandFlagSet (cliConfig * CLIConfig , goFlagsConfig * GoFlagsConfig ) (GinkgoFlagSet , error ) {
774
777
flags := GinkgoCLISharedFlags
775
778
flags = flags .CopyAppend (GoBuildFlags ... )
779
+ flags = flags .CopyAppend (GoBuildOFlags ... )
776
780
777
781
bindings := map [string ]any {
778
782
"C" : cliConfig ,
0 commit comments