Guest User

Untitled

a guest
Sep 3rd, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.44 KB | None | 0 0
  1. func TestAll(t *testing.T) {
  2.  
  3.     if _, err := os.Stat("/tmp/testsuite.lock"); os.IsNotExist(err) {
  4.         if _, err := os.Create("/tmp/testsuite.lock"); err != nil {
  5.             t.FailNow()
  6.         }
  7.  
  8.         for _, test := range ListAll(nil) {
  9.             output, _ := exec.Command("/bin/sh", "-c", fmt.Sprintf("./fw.test -check.v -check.f %s", test)).CombinedOutput()
  10.             fmt.Printf("%s\n", output)
  11.         }
  12.  
  13.         os.Remove("/tmp/testsuite.lock")
  14.     } else {
  15.         TestingT(t)
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment