From 47414f8e3b5cb70ce7e48f605671405a6da2757f Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Mon, 15 Feb 2021 13:41:57 +0100 Subject: [PATCH] makefiles/tests: add unit tests for fixed bug Make sure that optional features that would cause conflicts don't end up being used again. --- .../feature_resolution/test-conflict-optional.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 makefiles/tests/feature_resolution/test-conflict-optional.mk diff --git a/makefiles/tests/feature_resolution/test-conflict-optional.mk b/makefiles/tests/feature_resolution/test-conflict-optional.mk new file mode 100644 index 0000000000..5d64067dc2 --- /dev/null +++ b/makefiles/tests/feature_resolution/test-conflict-optional.mk @@ -0,0 +1,15 @@ +# inputs +FEATURES_OPTIONAL := b +FEATURES_REQUIRED := a c +FEATURES_REQUIRED_ANY := +FEATURES_PROVIDED := a b c d +FEATURES_BLACKLIST := +FEATURES_CONFLICT := a:b c:d + +# expected results +EXPECTED_FEATURES_USED := a c +EXPECTED_FEATURES_MISSING := +EXPECTED_FEATURES_USED_BLACKLISTED := +EXPECTED_FEATURES_CONFLICTING := + +include Makefile.test