Filip Tehlar | 229f5fc | 2022-08-09 14:44:47 +0000 | [diff] [blame] | 1 | package main |
| 2 | |
| 3 | import ( |
Adrian Villin | 681ff3a | 2024-06-07 06:45:48 -0400 | [diff] [blame] | 4 | "path/filepath" |
| 5 | "runtime" |
Filip Tehlar | bb98aac | 2022-12-21 14:40:35 +0100 | [diff] [blame] | 6 | "testing" |
Adrian Villin | 93974e2 | 2024-05-30 06:10:59 -0400 | [diff] [blame] | 7 | "time" |
Filip Tehlar | 229f5fc | 2022-08-09 14:44:47 +0000 | [diff] [blame] | 8 | |
Adrian Villin | cee15aa | 2024-03-14 11:42:55 -0400 | [diff] [blame] | 9 | . "github.com/onsi/ginkgo/v2" |
| 10 | . "github.com/onsi/gomega" |
Filip Tehlar | 229f5fc | 2022-08-09 14:44:47 +0000 | [diff] [blame] | 11 | ) |
| 12 | |
Adrian Villin | 93974e2 | 2024-05-30 06:10:59 -0400 | [diff] [blame] | 13 | var suiteTimeout time.Duration |
| 14 | |
Adrian Villin | 681ff3a | 2024-06-07 06:45:48 -0400 | [diff] [blame] | 15 | func getTestFilename() string { |
| 16 | _, filename, _, _ := runtime.Caller(2) |
| 17 | return filepath.Base(filename) |
| 18 | } |
| 19 | |
Adrian Villin | cee15aa | 2024-03-14 11:42:55 -0400 | [diff] [blame] | 20 | func TestHst(t *testing.T) { |
Adrian Villin | 93974e2 | 2024-05-30 06:10:59 -0400 | [diff] [blame] | 21 | if *isVppDebug { |
| 22 | // 30 minute timeout so that the framework won't timeout while debugging |
| 23 | suiteTimeout = time.Minute * 30 |
| 24 | } else { |
| 25 | suiteTimeout = time.Minute * 5 |
| 26 | } |
Adrian Villin | cee15aa | 2024-03-14 11:42:55 -0400 | [diff] [blame] | 27 | RegisterFailHandler(Fail) |
| 28 | RunSpecs(t, "HST") |
Maros Ondrejicka | c2f76f4 | 2023-02-27 13:22:45 +0100 | [diff] [blame] | 29 | } |