Files
vpp/extras/hs-test/framework_test.go
Adrian Villin 4677d920c0 hs-test: separate infra from tests
- most functions and vars now start with a capital letter:
  needed to access them outside the package that declares
  them
- updated README.md
- very minor changes in MAKEFILE

Type: test

Change-Id: I4b5a194f08f09d59e372e57da6451fbb5a1de4da
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-14 18:10:26 +00:00

39 lines
721 B
Go

package main
import (
"fmt"
"os"
"path/filepath"
"runtime"
"testing"
"time"
. "fd.io/hs-test/infra"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
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")
}