github.com/vchain-us/vcn@v0.9.11-0.20210921212052-a2484d23c0b3/integration/cli_test.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "os" 6 "os/exec" 7 "testing" 8 ) 9 10 /** 11 Main test, meant to compile the binary. If test fails everything else will be ignored 12 **/ 13 func TestMain(m *testing.M) { 14 err := os.Chdir("..") 15 if err != nil { 16 fmt.Printf("Error changing directory, aborting tests") 17 os.Exit(1) 18 } 19 build := exec.Command("make") 20 err = build.Run() 21 if err != nil { 22 fmt.Printf("Error compiling main binary, aborting tests") 23 os.Exit(1) 24 } 25 26 }