コード例 #1
0
ファイル: getos_test.py プロジェクト: zoritle/chromium
 def testGetSDKPath(self):
     """honors environment variable."""
     with mock.patch.dict('os.environ', {'NACL_SDK_ROOT': 'dummy'}):
         self.assertEqual(getos.GetSDKPath(), 'dummy')
コード例 #2
0
ファイル: getos_test.py プロジェクト: zoritle/chromium
 def testGetSDKPathDefault(self):
     """defaults to relative path."""
     del os.environ['NACL_SDK_ROOT']
     self.assertEqual(getos.GetSDKPath(), os.path.dirname(TOOLS_DIR))
コード例 #3
0
ファイル: nacl_config.py プロジェクト: ravishan/chromium
def GetPosixSDKPath():
    sdk_path = getos.GetSDKPath()
    if getos.GetPlatform() == 'win':
        return sdk_path.replace('\\', '/')
    else:
        return sdk_path