def testGetSDKPath(self): """honors environment variable.""" with mock.patch.dict('os.environ', {'NACL_SDK_ROOT': 'dummy'}): self.assertEqual(getos.GetSDKPath(), 'dummy')
def testGetSDKPathDefault(self): """defaults to relative path.""" del os.environ['NACL_SDK_ROOT'] self.assertEqual(getos.GetSDKPath(), os.path.dirname(TOOLS_DIR))
def GetPosixSDKPath(): sdk_path = getos.GetSDKPath() if getos.GetPlatform() == 'win': return sdk_path.replace('\\', '/') else: return sdk_path