main_test.go raw

   1  package main
   2  
   3  import (
   4  	"os"
   5  	"testing"
   6  )
   7  
   8  func TestMain(m *testing.M) {
   9  	if os.Getenv("RUN_GOGIO") != "" {
  10  		// Allow the end-to-end tests to call the gogio tool without
  11  		// having to build it from scratch, nor having to refactor the
  12  		// main function to avoid using global variables.
  13  		main()
  14  		os.Exit(0) // main already exits, but just in case.
  15  	}
  16  	os.Exit(m.Run())
  17  }
  18