@@ -46,6 +46,20 @@ func (b backend) Snapshotter() string {
46
46
}
47
47
48
48
func (b backend ) isUnsupportedFeature (feature string ) bool {
49
+ if enabledFeatures := os .Getenv ("BUILDKIT_TEST_ENABLE_FEATURES" ); enabledFeatures != "" {
50
+ for _ , enabledFeature := range strings .Split (enabledFeatures , "," ) {
51
+ if feature == enabledFeature {
52
+ return false
53
+ }
54
+ }
55
+ }
56
+ if disabledFeatures := os .Getenv ("BUILDKIT_TEST_DISABLE_FEATURES" ); disabledFeatures != "" {
57
+ for _ , disabledFeature := range strings .Split (disabledFeatures , "," ) {
58
+ if feature == disabledFeature {
59
+ return true
60
+ }
61
+ }
62
+ }
49
63
for _ , unsupportedFeature := range b .unsupportedFeatures {
50
64
if feature == unsupportedFeature {
51
65
return true
@@ -270,22 +284,22 @@ func printLogs(logs map[string]*bytes.Buffer, f func(args ...interface{})) {
270
284
}
271
285
272
286
const (
273
- FeatureCacheExport = "cache export "
274
- FeatureCacheImport = "cache import "
275
- FeatureDirectPush = "direct push "
276
- FeatureFrontendOutline = "frontend outline "
277
- FeatureFrontendTargets = "frontend targets "
278
- FeatureImageExporter = "image exporter "
287
+ FeatureCacheExport = "cache_export "
288
+ FeatureCacheImport = "cache_import "
289
+ FeatureDirectPush = "direct_push "
290
+ FeatureFrontendOutline = "frontend_outline "
291
+ FeatureFrontendTargets = "frontend_targets "
292
+ FeatureImageExporter = "image_exporter "
279
293
FeatureInfo = "info"
280
- FeatureMultiCacheExport = "multi cache export "
281
- FeatureMultiPlatform = "multi-platform "
282
- FeatureOCIExporter = "oci exporter "
283
- FeatureOCILayout = "oci layout "
294
+ FeatureMultiCacheExport = "multi_cache_export "
295
+ FeatureMultiPlatform = "multi_platform "
296
+ FeatureOCIExporter = "oci_exporter "
297
+ FeatureOCILayout = "oci_layout "
284
298
FeatureProvenance = "provenance"
285
299
FeatureSBOM = "sbom"
286
- FeatureSecurityMode = "security mode "
287
- FeatureSourceDateEpoch = "source date epoch "
288
- FeatureCNINetwork = "cni network "
300
+ FeatureSecurityMode = "security_mode "
301
+ FeatureSourceDateEpoch = "source_date_epoch "
302
+ FeatureCNINetwork = "cni_network "
289
303
)
290
304
291
305
var features = map [string ]struct {}{
0 commit comments