def testX86(self):
        """
        Test that various i?86 values => x86.
        """
        d = build_dict({'OS_TARGET':'WINNT',
                        'TARGET_CPU':'i486'})
        self.assertEqual('x86', d['processor'])

        d = build_dict({'OS_TARGET':'WINNT',
                        'TARGET_CPU':'i686'})
        self.assertEqual('x86', d['processor'])
    def testARM(self):
        """
        Test that all arm CPU architectures => arm.
        """
        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'arm'})
        self.assertEqual('arm', d['processor'])

        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'armv7'})
        self.assertEqual('arm', d['processor'])
    def testMac(self):
        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'i386'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('x86', d['processor'])
        self.assertEqual(32, d['bits'])

        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'x86_64'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('x86_64', d['processor'])
        self.assertEqual(64, d['bits'])
    def testLinux(self):
        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'i386'})
        self.assertEqual('linux', d['os'])
        self.assertEqual('x86', d['processor'])
        self.assertEqual(32, d['bits'])

        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'x86_64'})
        self.assertEqual('linux', d['os'])
        self.assertEqual('x86_64', d['processor'])
        self.assertEqual(64, d['bits'])
 def testDebug(self):
     """
     Test that debug values are properly detected.
     """
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386'})
     self.assertEqual(False, d['debug'])
     
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386',
                     'MOZ_DEBUG':'1'})
     self.assertEqual(True, d['debug'])
Beispiel #6
0
    def testARM(self):
        """
        Test that all arm CPU architectures => arm.
        """
        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'arm',
                        'MOZ_WIDGET_TOOLKIT':'gtk2'})
        self.assertEqual('arm', d['processor'])

        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'armv7',
                        'MOZ_WIDGET_TOOLKIT':'gtk2'})
        self.assertEqual('arm', d['processor'])
Beispiel #7
0
    def testX86(self):
        """
        Test that various i?86 values => x86.
        """
        d = build_dict({'OS_TARGET':'WINNT',
                        'TARGET_CPU':'i486',
                        'MOZ_WIDGET_TOOLKIT':'windows'})
        self.assertEqual('x86', d['processor'])

        d = build_dict({'OS_TARGET':'WINNT',
                        'TARGET_CPU':'i686',
                        'MOZ_WIDGET_TOOLKIT':'windows'})
        self.assertEqual('x86', d['processor'])
Beispiel #8
0
 def testCrashreporter(self):
     """
     Test that crashreporter values are properly detected.
     """
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'gtk2'})
     self.assertEqual(False, d['crashreporter'])
     
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'gtk2',
                     'MOZ_CRASHREPORTER':'1'})
     self.assertEqual(True, d['crashreporter'])
Beispiel #9
0
 def testDebug(self):
     """
     Test that debug values are properly detected.
     """
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'gtk2'})
     self.assertEqual(False, d['debug'])
     
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'gtk2',
                     'MOZ_DEBUG':'1'})
     self.assertEqual(True, d['debug'])
 def testCrashreporter(self):
     """
     Test that crashreporter values are properly detected.
     """
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'gtk2'})
     self.assertEqual(False, d['crashreporter'])
     
     d = build_dict({'OS_TARGET':'Linux',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'gtk2',
                     'MOZ_CRASHREPORTER':'1'})
     self.assertEqual(True, d['crashreporter'])
    def testMac(self):
        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'i386',
                        'MOZ_WIDGET_TOOLKIT':'cocoa'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('x86', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertEqual(32, d['bits'])

        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'x86_64',
                        'MOZ_WIDGET_TOOLKIT':'cocoa'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('x86_64', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertEqual(64, d['bits'])
    def testLinux(self):
        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'i386',
                        'MOZ_WIDGET_TOOLKIT':'gtk2'})
        self.assertEqual('linux', d['os'])
        self.assertEqual('x86', d['processor'])
        self.assertEqual('gtk2', d['toolkit'])
        self.assertEqual(32, d['bits'])

        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'x86_64',
                        'MOZ_WIDGET_TOOLKIT':'gtk2'})
        self.assertEqual('linux', d['os'])
        self.assertEqual('x86_64', d['processor'])
        self.assertEqual('gtk2', d['toolkit'])
        self.assertEqual(64, d['bits'])
Beispiel #13
0
    def testLinux(self):
        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'i386',
                        'MOZ_WIDGET_TOOLKIT':'gtk2'})
        self.assertEqual('linux', d['os'])
        self.assertEqual('x86', d['processor'])
        self.assertEqual('gtk2', d['toolkit'])
        self.assertEqual(32, d['bits'])

        d = build_dict({'OS_TARGET':'Linux',
                        'TARGET_CPU':'x86_64',
                        'MOZ_WIDGET_TOOLKIT':'gtk2'})
        self.assertEqual('linux', d['os'])
        self.assertEqual('x86_64', d['processor'])
        self.assertEqual('gtk2', d['toolkit'])
        self.assertEqual(64, d['bits'])
Beispiel #14
0
    def testMac(self):
        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'i386',
                        'MOZ_WIDGET_TOOLKIT':'cocoa'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('x86', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertEqual(32, d['bits'])

        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'x86_64',
                        'MOZ_WIDGET_TOOLKIT':'cocoa'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('x86_64', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertEqual(64, d['bits'])
 def testAndroid(self):
     d = build_dict({'OS_TARGET':'Android',
                     'TARGET_CPU':'arm',
                     'MOZ_WIDGET_TOOLKIT':'android'})
     self.assertEqual('android', d['os'])
     self.assertEqual('arm', d['processor'])
     self.assertEqual('android', d['toolkit'])
     self.assertEqual(32, d['bits'])
Beispiel #16
0
 def testAndroid(self):
     d = build_dict({'OS_TARGET':'Android',
                     'TARGET_CPU':'arm',
                     'MOZ_WIDGET_TOOLKIT':'android'})
     self.assertEqual('android', d['os'])
     self.assertEqual('arm', d['processor'])
     self.assertEqual('android', d['toolkit'])
     self.assertEqual(32, d['bits'])
 def testWin(self):
     d = build_dict({'OS_TARGET':'WINNT',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'windows'})
     self.assertEqual('win', d['os'])
     self.assertEqual('x86', d['processor'])
     self.assertEqual('windows', d['toolkit'])
     self.assertEqual(32, d['bits'])
Beispiel #18
0
 def testWin(self):
     d = build_dict({'OS_TARGET':'WINNT',
                     'TARGET_CPU':'i386',
                     'MOZ_WIDGET_TOOLKIT':'windows'})
     self.assertEqual('win', d['os'])
     self.assertEqual('x86', d['processor'])
     self.assertEqual('windows', d['toolkit'])
     self.assertEqual(32, d['bits'])
    def testMacUniversal(self):
        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'i386',
                        'MOZ_WIDGET_TOOLKIT':'cocoa',
                        'UNIVERSAL_BINARY': '1'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('universal-x86-x86_64', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertFalse('bits' in d)

        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'x86_64',
                        'MOZ_WIDGET_TOOLKIT':'cocoa',
                        'UNIVERSAL_BINARY': '1'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('universal-x86-x86_64', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertFalse('bits' in d)
Beispiel #20
0
    def testMacUniversal(self):
        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'i386',
                        'MOZ_WIDGET_TOOLKIT':'cocoa',
                        'UNIVERSAL_BINARY': '1'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('universal-x86-x86_64', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertFalse('bits' in d)

        d = build_dict({'OS_TARGET':'Darwin',
                        'TARGET_CPU':'x86_64',
                        'MOZ_WIDGET_TOOLKIT':'cocoa',
                        'UNIVERSAL_BINARY': '1'})
        self.assertEqual('mac', d['os'])
        self.assertEqual('universal-x86-x86_64', d['processor'])
        self.assertEqual('cocoa', d['toolkit'])
        self.assertFalse('bits' in d)
 def testUnknown(self):
     """
     Test that unknown values pass through okay.
     """
     d = build_dict({'OS_TARGET':'RandOS',
                     'TARGET_CPU':'cptwo'})
     self.assertEqual("randos", d["os"])
     self.assertEqual("cptwo", d["processor"])
     # unknown CPUs should not get a bits value
     self.assertFalse("bits" in d)
Beispiel #22
0
 def testUnknown(self):
     """
     Test that unknown values pass through okay.
     """
     d = build_dict({'OS_TARGET':'RandOS',
                     'TARGET_CPU':'cptwo',
                     'MOZ_WIDGET_TOOLKIT':'foobar'})
     self.assertEqual("randos", d["os"])
     self.assertEqual("cptwo", d["processor"])
     self.assertEqual("foobar", d["toolkit"])
     # unknown CPUs should not get a bits value
     self.assertFalse("bits" in d)
 def testWin(self):
     d = build_dict({'OS_TARGET':'WINNT',
                     'TARGET_CPU':'i386'})
     self.assertEqual('win', d['os'])
     self.assertEqual('x86', d['processor'])
     self.assertEqual(32, d['bits'])