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