#Test USE changes.
#The simple case.
- (["dev-libs/A:1"], {"--autounmask": "n"}, None, False, None),
+ (["dev-libs/A:1"], {"--autounmask": "n"}, None, False, None, None),
(["dev-libs/A:1"], {"--autounmask": True}, None, False, \
- ["dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1"]),
+ ["dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1"], { "dev-libs/B-1": {"foo": True} }),
#Make sure we restart if needed.
-
(["dev-libs/B", "dev-libs/A:1"], {"--autounmask": True}, None, False, \
- ["dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1"]),
+ ["dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1"], { "dev-libs/B-1": {"foo": True} }),
(["dev-libs/A:1", "dev-libs/B"], {"--autounmask": True}, None, False, \
- ["dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1"]),
+ ["dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1"], { "dev-libs/B-1": {"foo": True} }),
(["dev-libs/A:1", "dev-libs/A:2"], {"--autounmask": True}, None, False, \
- ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"]),
+ ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"], { "dev-libs/B-1": {"foo": True, "bar": True} }),
(["dev-libs/B", "dev-libs/A:1", "dev-libs/A:2"], {"--autounmask": True}, None, False, \
- ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"]),
+ ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"], { "dev-libs/B-1": {"foo": True, "bar": True} }),
(["dev-libs/A:1", "dev-libs/B", "dev-libs/A:2"], {"--autounmask": True}, None, False, \
- ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"]),
+ ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"], { "dev-libs/B-1": {"foo": True, "bar": True} }),
(["dev-libs/A:1", "dev-libs/A:2", "dev-libs/B"], {"--autounmask": True}, None, False, \
- ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"]),
+ ["dev-libs/D-1", "dev-libs/C-1", "dev-libs/B-1", "dev-libs/A-1", "dev-libs/A-2"], { "dev-libs/B-1": {"foo": True, "bar": True} }),
#Test keywording.
#The simple case.
- (["app-misc/Z"], {"--autounmask": "n"}, None, False, None),
+ (["app-misc/Z"], {"--autounmask": "n"}, None, False, None, None),
(["app-misc/Z"], {"--autounmask": True}, None, False, \
- ["app-misc/Y-1", "app-misc/Z-1"]),
+ ["app-misc/Y-1", "app-misc/Z-1"], None),
#Make sure that the backtracking for slot conflicts handles our mess.
(["=app-misc/V-1", "app-misc/W"], {"--autounmask": True}, None, False, \
- ["app-misc/W-2", "app-misc/V-1"]),
+ ["app-misc/W-2", "app-misc/V-1"], None),
(["app-misc/W", "=app-misc/V-1"], {"--autounmask": True}, None, False, \
- ["app-misc/W-2", "app-misc/V-1"]),
+ ["app-misc/W-2", "app-misc/V-1"], None),
#Mixed testing
#Make sure we don't change use for something in a || dep if there is another choice
#that needs no change.
(["=sci-libs/K-1"], {"--autounmask": True}, None, True, \
- ["sci-libs/P-1", "sci-libs/K-1"]),
+ ["sci-libs/P-1", "sci-libs/K-1"], None),
(["=sci-libs/K-2"], {"--autounmask": True}, None, True, \
- ["sci-libs/P-1", "sci-libs/K-2"]),
+ ["sci-libs/P-1", "sci-libs/K-2"], None),
(["=sci-libs/K-3"], {"--autounmask": True}, None, True, \
- ["sci-libs/P-1", "sci-libs/K-3"]),
+ ["sci-libs/P-1", "sci-libs/K-3"], None),
(["=sci-libs/K-4"], {"--autounmask": True}, None, True, \
- ["sci-libs/P-1", "sci-libs/K-4"]),
+ ["sci-libs/P-1", "sci-libs/K-4"], None),
(["=sci-libs/K-5"], {"--autounmask": True}, None, True, \
- ["sci-libs/P-1", "sci-libs/K-5"]),
+ ["sci-libs/P-1", "sci-libs/K-5"], None),
(["=sci-libs/K-6"], {"--autounmask": True}, None, True, \
- ["sci-libs/P-1", "sci-libs/K-6"]),
+ ["sci-libs/P-1", "sci-libs/K-6"], None),
#Make sure we prefer use changes over keyword changes.
(["=sci-libs/K-7"], {"--autounmask": True}, None, False, \
- ["sci-libs/L-1", "sci-libs/K-7"]),
+ ["sci-libs/L-1", "sci-libs/K-7"], { "sci-libs/L-1": { "bar": True } }),
(["=sci-libs/K-8"], {"--autounmask": True}, None, False, \
- ["sci-libs/L-1", "sci-libs/K-8"]),
+ ["sci-libs/L-1", "sci-libs/K-8"], { "sci-libs/L-1": { "bar": True } }),
)
playground = ResolverPlayground(ebuilds=ebuilds)
try:
for atoms, options, action, \
- expected_result, expected_mergelist in requests:
+ expected_result, expected_mergelist, expected_use_changes in requests:
result = playground.run(atoms, options, action)
- self.assertEqual((result.success, result.mergelist),
- (expected_result, expected_mergelist))
+ self.assertEqual((result.success, result.mergelist, result.use_changes),
+ (expected_result, expected_mergelist, expected_use_changes))
finally:
playground.cleanup()