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

Unified Diff: native_client_sdk/src/build_tools/tests/test_sdktools.py

Issue 11228013: [NaCl SDK] Refactor sdk_update*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build_updater Created 8 years, 2 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/build_tools/sdk_tools/sdk_update_main.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/build_tools/tests/test_sdktools.py
diff --git a/native_client_sdk/src/build_tools/tests/test_sdktools.py b/native_client_sdk/src/build_tools/tests/test_sdktools.py
index c453f240d384d652ec5465c022c3335d1eda900e..0f3731ceabb4143b34ce30980f39f0f0f3be0b0a 100755
--- a/native_client_sdk/src/build_tools/tests/test_sdktools.py
+++ b/native_client_sdk/src/build_tools/tests/test_sdktools.py
@@ -112,15 +112,16 @@ class SdkToolsTestCase(unittest.TestCase):
naclsdk_shell_script = os.path.join(self.basedir, 'nacl_sdk', 'naclsdk')
if getos.GetPlatform() == 'win':
naclsdk_shell_script += '.bat'
- cmd = [naclsdk_shell_script, '-U', self.server.GetURL(MANIFEST_BASENAME)]
+ cmd = [naclsdk_shell_script]
cmd.extend(args)
+ cmd.extend(['-U', self.server.GetURL(MANIFEST_BASENAME)])
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
stdout, _ = process.communicate()
self.assertEqual(process.returncode, 0)
return stdout
-
+
def _RunAndExtractRevision(self):
- stdout = self._Run(['-v'])
+ stdout = self._Run(['version'])
match = re.search('version r(\d+)', stdout)
self.assertTrue(match is not None)
return int(match.group(1))
@@ -195,11 +196,12 @@ class TestAutoUpdateSdkTools(SdkToolsTestCase):
self.sdk_tools_bundle.revision = new_revision
self._WriteManifest()
- stdout = self._Run(['update', 'sdk_tools'])
- self.assertTrue(stdout.find('Ignoring manual update request.') != -1)
sdk_tools_update_dir = os.path.join(self.basedir, 'nacl_sdk',
'sdk_tools_update')
self.assertFalse(os.path.exists(sdk_tools_update_dir))
+ stdout = self._Run(['update', 'sdk_tools'])
+ self.assertTrue(stdout.find('Ignoring manual update request.') != -1)
+ self.assertFalse(os.path.exists(sdk_tools_update_dir))
class TestAutoUpdateSdkToolsDifferentFilesystem(TestAutoUpdateSdkTools):
@@ -211,10 +213,7 @@ class TestAutoUpdateSdkToolsDifferentFilesystem(TestAutoUpdateSdkTools):
def main():
- suite = unittest.defaultTestLoader.loadTestsFromModule(sys.modules[__name__])
- result = unittest.TextTestRunner(verbosity=2).run(suite)
-
- return int(not result.wasSuccessful())
+ unittest.main()
if __name__ == '__main__':
sys.exit(main())
« no previous file with comments | « native_client_sdk/src/build_tools/sdk_tools/sdk_update_main.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698