Guest User

Untitled

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