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

Side by Side Diff: tools/release/test_backport_node.py

Issue 2846883002: [tools] backport_node.py increments V8 version in target. (Closed)
Patch Set: sort imports Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2017 the V8 project authors. All rights reserved. 2 # Copyright 2017 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import shutil 7 import shutil
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import tempfile 10 import tempfile
11 import unittest 11 import unittest
12 12
13 from common_includes import FileToText
13 import backport_node 14 import backport_node
14 15
15 # Base paths. 16 # Base paths.
16 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 17 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
17 TEST_DATA = os.path.join(BASE_DIR, 'testdata') 18 TEST_DATA = os.path.join(BASE_DIR, 'testdata')
18 19
19 def gitify(path): 20 def gitify(path):
20 files = os.listdir(path) 21 files = os.listdir(path)
21 subprocess.check_call(['git', 'init'], cwd=path) 22 subprocess.check_call(['git', 'init'], cwd=path)
22 subprocess.check_call(['git', 'add'] + files, cwd=path) 23 subprocess.check_call(['git', 'add'] + files, cwd=path)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 message = subprocess.check_output(['git', 'log', '-1', '--format=%B'], cwd=n ode_cwd) 56 message = subprocess.check_output(['git', 'log', '-1', '--format=%B'], cwd=n ode_cwd)
56 self.assertIn('Original commit message:\n\n Title\n\n Body', message) 57 self.assertIn('Original commit message:\n\n Title\n\n Body', message)
57 58
58 # Check patch. 59 # Check patch.
59 gitlog = subprocess.check_output( 60 gitlog = subprocess.check_output(
60 ['git', 'diff', 'master', '--cached', '--', 'deps/v8/v8_foo'], 61 ['git', 'diff', 'master', '--cached', '--', 'deps/v8/v8_foo'],
61 cwd=node_cwd, 62 cwd=node_cwd,
62 ) 63 )
63 self.assertIn('+zonk', gitlog.strip()) 64 self.assertIn('+zonk', gitlog.strip())
64 65
66 # Check version.
67 version_file = os.path.join(node_cwd, "deps", "v8", "include", "v8-version.h ")
68 self.assertIn('#define V8_PATCH_LEVEL 4322', FileToText(version_file))
69
65 if __name__ == "__main__": 70 if __name__ == "__main__":
66 unittest.main() 71 unittest.main()
OLDNEW
« no previous file with comments | « tools/release/backport_node.py ('k') | tools/release/testdata/node/deps/v8/include/v8-version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698