
- Release build runs on numa node0, debug on node1. Using the last digit of a build number to reserve 4 cores per test mmeans we can run 20 jobs (10 release, 10 debug) on the same machine, assuming we have 111 cores available (not counting core 0). Can be increased if needed, there are still some cores left. - Added separate numa aware cpu allocation - Added CPU0=true|false (useful for users with 4c/8t) Type: test Change-Id: Iba8e492a4e01a7f457e49112303887a2a27f6af9 Signed-off-by: Adrian Villin <avillin@cisco.com>
45 lines
912 B
Go
45 lines
912 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path/filepath"
|
|
"runtime"
|
|
"strings"
|
|
"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
|
|
}
|
|
|
|
output, err := os.ReadFile("/sys/devices/system/node/online")
|
|
fmt.Println(string(output))
|
|
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")
|
|
}
|