@@ -583,6 +583,9 @@ var GoBuildFlags = GinkgoFlags{
583583 Usage : "print the name of the temporary work directory and do not delete it when exiting." },
584584 {KeyPath : "Go.X" , Name : "x" , SectionKey : "go-build" ,
585585 Usage : "print the commands." },
586+ }
587+
588+ var GoBuildOFlags = GinkgoFlags {
586589 {KeyPath : "Go.O" , Name : "o" , SectionKey : "go-build" ,
587590 Usage : "output binary path (including name)." },
588591}
@@ -683,7 +686,7 @@ func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, packageToBuild strin
683686
684687 args := []string {"test" , "-c" , packageToBuild }
685688 goArgs , err := GenerateFlagArgs (
686- GoBuildFlags ,
689+ GoBuildFlags . CopyAppend ( GoBuildOFlags ... ) ,
687690 map [string ]any {
688691 "Go" : & goFlagsConfig ,
689692 },
@@ -773,6 +776,7 @@ func BuildWatchCommandFlagSet(suiteConfig *SuiteConfig, reporterConfig *Reporter
773776func BuildBuildCommandFlagSet (cliConfig * CLIConfig , goFlagsConfig * GoFlagsConfig ) (GinkgoFlagSet , error ) {
774777 flags := GinkgoCLISharedFlags
775778 flags = flags .CopyAppend (GoBuildFlags ... )
779+ flags = flags .CopyAppend (GoBuildOFlags ... )
776780
777781 bindings := map [string ]any {
778782 "C" : cliConfig ,
0 commit comments