
- Also added checkstyle-go and fixstyle-go to 'make help' Type: make Change-Id: I5402efa02bbbc54a20db8f54b0488c58a62ffaa1 Signed-off-by: Adrian Villin <avillin@cisco.com>
40 lines
728 B
Go
40 lines
728 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path/filepath"
|
|
"runtime"
|
|
"testing"
|
|
"time"
|
|
|
|
. "github.com/onsi/ginkgo/v2"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var suiteTimeout time.Duration
|
|
|
|
func getTestFilename() string {
|
|
_, filename, _, _ := runtime.Caller(2)
|
|
return filepath.Base(filename)
|
|
}
|
|
|
|
func TestHst(t *testing.T) {
|
|
if *isVppDebug {
|
|
// 30 minute timeout so that the framework won't timeout while debugging
|
|
suiteTimeout = time.Minute * 30
|
|
} else {
|
|
suiteTimeout = time.Minute * 5
|
|
}
|
|
|
|
// creates a file with PPID, used for 'make cleanup-hst'
|
|
ppid := fmt.Sprint(os.Getppid())
|
|
ppid = ppid[:len(ppid)-1]
|
|
f, _ := os.Create(".last_hst_ppid")
|
|
f.Write([]byte(ppid))
|
|
f.Close()
|
|
|
|
RegisterFailHandler(Fail)
|
|
RunSpecs(t, "HST")
|
|
}
|