Exemplo n.º 1
0
    def testFlavorPreferences(self):
        self.mock(arch, 'baseArch', 'i686')
        currentArch = arch.flags_i686()
        self.assertEqual(arch.getFlavorPreferences(currentArch), [])
        self.unmock()

        self.mock(arch, 'baseArch', 'x86_64')
        currentArch = arch.flags_x86_64()
        self.assertEqual(
            arch.getFlavorPreferences(currentArch),
            [arch.deps.parseFlavor(x) for x in ['is: x86_64', 'is: x86']])
        self.unmock()
Exemplo n.º 2
0
    def testFlavorPreferences(self):
        self.mock(arch, 'baseArch', 'i686')
        currentArch = arch.flags_i686()
        self.assertEqual(arch.getFlavorPreferences(currentArch),
            [])
        self.unmock()

        self.mock(arch, 'baseArch', 'x86_64')
        currentArch = arch.flags_x86_64()
        self.assertEqual(arch.getFlavorPreferences(currentArch),
            [ arch.deps.parseFlavor(x)
                for x in ['is: x86_64', 'is: x86'] ])
        self.unmock()
Exemplo n.º 3
0
 def testCurrentArch(self):
     self.mock(arch, 'baseArch', 'x86_64')
     currentArch = arch.flags_x86_64()
     archKey = arch.FlavorPreferences._getCurrentArchIS(currentArch)
     self.assertEqual(archKey, 'x86 x86_64')
Exemplo n.º 4
0
 def testMultilib(self):
     depSet = deps.DependencySet()
     depSet.addDeps(deps.InstructionSetDependency, arch.flags_x86_64()[0])
     use.setBuildFlagsFromFlavor(None, depSet)
     self.assertTrue(use.Arch.x86_64)
     self.assertFalse(use.Arch.x86)
Exemplo n.º 5
0
 def testCurrentArch(self):
     self.mock(arch, 'baseArch', 'x86_64')
     currentArch = arch.flags_x86_64()
     archKey = arch.FlavorPreferences._getCurrentArchIS(currentArch)
     self.assertEqual(archKey, 'x86 x86_64')
Exemplo n.º 6
0
 def testMultilib(self):
     depSet = deps.DependencySet()
     depSet.addDeps(deps.InstructionSetDependency, arch.flags_x86_64()[0])
     use.setBuildFlagsFromFlavor(None, depSet)
     self.assertTrue(use.Arch.x86_64)
     self.assertFalse(use.Arch.x86)