Show test binary version
Each test output should start with version of the test binary. This is
useful when using openshift-tests as CSI driver certification suite - the
test results should show what version of tests was run.
@@ -7,6 +7,7 @@ import (
"io"
"math/rand"
"os"
+ "path/filepath"
"time"
"github.com/spf13/cobra"
@@ -19,6 +20,7 @@ import (
"github.com/openshift/library-go/pkg/serviceability"
"github.com/openshift/origin/pkg/monitor"
testginkgo "github.com/openshift/origin/pkg/test/ginkgo"
+ "github.com/openshift/origin/pkg/version"
exutil "github.com/openshift/origin/test/extended/util"
)
@@ -111,6 +113,9 @@ func newRunCommand() *cobra.Command {
SilenceErrors: true,
RunE: func(cmd *cobra.Command, args []string) error {
return mirrorToFile(opt, func() error {
+ if !opt.DryRun {
+ fmt.Fprintf(os.Stderr, "%s version: %s\n", filepath.Base(os.Args[0]), version.Get().String())
+ }
config, err := decodeProvider(opt.Provider, opt.DryRun, true)
if err != nil {
return err
