aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/framework_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/framework_test.go')
-rw-r--r--extras/hs-test/framework_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/extras/hs-test/framework_test.go b/extras/hs-test/framework_test.go
index 8773fa2417d..91cb1032bba 100644
--- a/extras/hs-test/framework_test.go
+++ b/extras/hs-test/framework_test.go
@@ -1,13 +1,36 @@
package main
import (
+ "fmt"
+ "os"
+ "strings"
"testing"
+ "time"
+ . "fd.io/hs-test/infra"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
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
+ }
+
+ output, err := os.ReadFile("/sys/devices/system/node/online")
+ if err == nil && strings.Contains(string(output), "-") {
+ NumaAwareCpuAlloc = true
+ }
+ // 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")
}