Skip to content

Commit 943c3ad

Browse files
committed
dockerfile: move cdi run device to labs
Signed-off-by: CrazyMax <[email protected]>
1 parent d69cc70 commit 943c3ad

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//go:build !dfrundevice
2+
3+
package dockerfile2llb
4+
5+
import (
6+
"github.com/moby/buildkit/client/llb"
7+
"github.com/moby/buildkit/frontend/dockerfile/instructions"
8+
)
9+
10+
func dispatchRunDevices(_ *instructions.RunCommand) ([]llb.RunOption, error) {
11+
return nil, nil
12+
}

frontend/dockerfile/dockerfile2llb/convert_rundevice.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package dockerfile2llb
1+
//go:build dfrundevice
22

3-
// TODO: move in labs with dfrundevice tag
3+
package dockerfile2llb
44

55
import (
66
"github.com/moby/buildkit/client/llb"

frontend/dockerfile/dockerfile_rundevice_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build dfrundevice
2+
13
package dockerfile
24

35
import (
@@ -13,10 +15,12 @@ import (
1315
"github.com/tonistiigi/fsutil"
1416
)
1517

16-
var deviceTests = integration.TestFuncs(
17-
testDeviceEnv,
18-
testDeviceRunEnv,
19-
)
18+
func init() {
19+
allTests = append(allTests, integration.TestFuncs(
20+
testDeviceEnv,
21+
testDeviceRunEnv,
22+
)...)
23+
}
2024

2125
func testDeviceEnv(t *testing.T, sb integration.Sandbox) {
2226
if sb.Rootless() {

frontend/dockerfile/dockerfile_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ func TestIntegration(t *testing.T) {
301301
"granted": networkHostGranted,
302302
"denied": networkHostDenied,
303303
}))...)
304-
305-
integration.Run(t, deviceTests, opts...)
306304
}
307305

308306
func testEmptyStringArgInEnv(t *testing.T, sb integration.Sandbox) {

frontend/dockerfile/release/labs/tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dfrunsecurity dfparents dfexcludepatterns dfcopychmodnonoctal
1+
dfrunsecurity dfparents dfexcludepatterns dfcopychmodnonoctal dfrundevice

0 commit comments

Comments
 (0)