def test_no_gyp_flags_with_other(self): self.AssertIsNone( slave_utils.GetGypFlag( { 'factory_properties': { 'gclient_env': { 'OTHER_DEFINES': 'tiger=1' } } }, 'tiger'))
def test_triple_gyp_flag_last(self): self.assertTrue( slave_utils.GetGypFlag( { 'factory_properties': { 'gclient_env': { 'GYP_DEFINES': 'tiger=1 buffalo giraffe' } } }, 'giraffe'))
def test_gyp_flag_not_present(self): self.AssertIsNone( slave_utils.GetGypFlag( { 'factory_properties': { 'gclient_env': { 'GYP_DEFINES': 'tiger=1' }, } }, 'chromeos'))
def test_triple_gyp_flag_center(self): self.assertEqual( slave_utils.GetGypFlag( { 'factory_properties': { 'gclient_env': { 'GYP_DEFINES': 'bull tiger=x03 frog' }, } }, 'tiger'), 'x03')
def test_single_gyp_flag_zero(self): self.assertEqual( slave_utils.GetGypFlag( { 'factory_properties': { 'gclient_env': { 'GYP_DEFINES': 'chromeos=0' }, 'trigger': 'chromiumos_dbg_trigger', 'window_manager': False, } }, 'chromeos'), '0')
def test_no_properties_flags(self): self.AssertIsNone(slave_utils.GetGypFlag({}, 'chromeos'))
def test_no_gyp_flags(self): self.AssertIsNone( slave_utils.GetGypFlag({'factory_properties': {}}, 'chromeos'))