tests: add unsupported features detection skeleton

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-08-04 11:25:57 +01:00
parent 4e7709e54c
commit 5e46d8057d
5 changed files with 32 additions and 10 deletions

View File

@ -35,7 +35,7 @@ func (s *backend) Rootless() bool {
return false
}
func (b backend) Supports(feature string) bool {
func (s backend) Supports(feature string) bool {
if enabledFeatures := os.Getenv("BUILDKIT_TEST_ENABLE_FEATURES"); enabledFeatures != "" {
for _, enabledFeature := range strings.Split(enabledFeatures, ",") {
if feature == enabledFeature {
@ -50,7 +50,7 @@ func (b backend) Supports(feature string) bool {
}
}
}
for _, unsupportedFeature := range b.unsupportedFeatures {
for _, unsupportedFeature := range s.unsupportedFeatures {
if feature == unsupportedFeature {
return false
}