Skip to content

Commit e0e96b5

Browse files
authored
Merge pull request #180 from xibz/jailer_override
Adds FC_TEST_JAILER_BIN to specify test jailer bin
2 parents 741fc8c + 694877c commit e0e96b5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.buildkite/pipeline.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,3 @@ steps:
104104
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
105105
distro: "${BUILDKITE_AGENT_META_DATA_DISTRO}"
106106
hostname: "${BUILDKITE_AGENT_META_DATA_HOSTNAME}"
107-
108-

machine_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ const (
4646
firecrackerBinaryPath = "firecracker"
4747
firecrackerBinaryOverrideEnv = "FC_TEST_BIN"
4848

49-
defaultJailerBinary = "jailer"
49+
defaultJailerBinary = "jailer"
50+
jailerBinaryOverrideEnv = "FC_TEST_JAILER_BIN"
5051

5152
defaultTuntapName = "fc-test-tap0"
5253
tuntapOverrideEnv = "FC_TEST_TAP"
@@ -184,6 +185,7 @@ func TestJailerMicroVMExecution(t *testing.T) {
184185
},
185186
},
186187
JailerCfg: &JailerConfig{
188+
JailerBinary: getJailerBinaryPath(),
187189
GID: Int(jailerGID),
188190
UID: Int(jailerUID),
189191
NumaNode: Int(0),
@@ -473,6 +475,13 @@ func getFirecrackerBinaryPath() string {
473475
return filepath.Join(testDataPath, firecrackerBinaryPath)
474476
}
475477

478+
func getJailerBinaryPath() string {
479+
if val := os.Getenv(jailerBinaryOverrideEnv); val != "" {
480+
return val
481+
}
482+
return filepath.Join(testDataPath, defaultJailerBinary)
483+
}
484+
476485
func getVmlinuxPath(t *testing.T) string {
477486
t.Helper()
478487
vmlinuxPath := filepath.Join(testDataPath, "./vmlinux")

0 commit comments

Comments
 (0)