Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: native_client_sdk/src/tools/tests/nacl_config_test.py

Issue 118553007: [NaCl SDK] Use nacl_config.py in common.mk build system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/tools/tests/getos_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/tests/nacl_config_test.py
diff --git a/native_client_sdk/src/tools/tests/nacl_config_test.py b/native_client_sdk/src/tools/tests/nacl_config_test.py
index 1d3489a0ba8dac7d57cde0050a0de4704fd145dc..c4e9919507797c91fedd1d62a0f6ce7c887228c5 100755
--- a/native_client_sdk/src/tools/tests/nacl_config_test.py
+++ b/native_client_sdk/src/tools/tests/nacl_config_test.py
@@ -53,6 +53,19 @@ class TestNaclConfig(unittest.TestCase):
self.assertEqual(expected, nacl_config.GetCFlags(toolchain))
self.assertRaises(nacl_config.Error, nacl_config.GetCFlags, 'foo')
+ def testIncludeDirs(self):
+ cases = {
+ 'newlib': '/sdk_root/include /sdk_root/include/newlib',
+ 'glibc': '/sdk_root/include /sdk_root/include/glibc',
+ 'pnacl': '/sdk_root/include /sdk_root/include/pnacl',
+ 'win': '/sdk_root/include /sdk_root/include/win',
+ 'mac': '/sdk_root/include /sdk_root/include/mac',
+ 'linux': '/sdk_root/include /sdk_root/include/linux'
+ }
+ for toolchain, expected in cases.iteritems():
+ self.assertEqual(expected, nacl_config.GetIncludeDirs(toolchain))
+ self.assertRaises(nacl_config.Error, nacl_config.GetIncludeDirs, 'foo')
+
def testLDFlags(self):
self.assertEqual('-L/sdk_root/lib', nacl_config.GetLDFlags())
@@ -72,8 +85,6 @@ class TestNaclConfig(unittest.TestCase):
'/sdk_root/toolchain/mac_x86_glibc/bin/i686-nacl-%s' % nacl_tool,
('glibc', 'x86_64'):
'/sdk_root/toolchain/mac_x86_glibc/bin/x86_64-nacl-%s' % nacl_tool,
- ('glibc', 'arm'):
- '/sdk_root/toolchain/mac_arm_glibc/bin/arm-nacl-%s' % nacl_tool,
'pnacl': '/sdk_root/toolchain/mac_pnacl/bin/pnacl-%s' % pnacl_tool,
}
@@ -91,6 +102,10 @@ class TestNaclConfig(unittest.TestCase):
self.assertRaises(nacl_config.Error,
nacl_config.GetToolPath, toolchain, None, tool)
+ # No arm glibc.
+ self.assertRaises(nacl_config.Error,
+ nacl_config.GetToolPath, 'glibc', 'arm', tool)
+
def testCC(self):
self._TestTool('cc', 'gcc', 'clang')
@@ -113,6 +128,5 @@ class TestNaclConfig(unittest.TestCase):
nacl_config.GetToolPath(toolchain, arch, 'gdb'))
-
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « native_client_sdk/src/tools/tests/getos_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698