def setUp(self): super(JvmTaskTest, self).setUp() self.workdir = safe_mkdtemp() self.t1 = self.make_target('t1', exclusives={'foo': 'a'}) self.t2 = self.make_target('t2', exclusives={'foo': 'a'}) self.t3 = self.make_target('t3', exclusives={'foo': 'b'}) # Force exclusive propagation on the targets. self.t1.get_all_exclusives() self.t2.get_all_exclusives() self.t3.get_all_exclusives() context = self.context(target_roots=[self.t1, self.t2, self.t3]) # Create the exclusives mapping. exclusives_mapping = ExclusivesMapping(context) exclusives_mapping.add_conflict('foo', ['a', 'b']) exclusives_mapping._populate_target_maps(context.targets()) context.products.safe_create_data('exclusives_groups', lambda: exclusives_mapping) self.task = DummyJvmTask(context, self.workdir)