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

Side by Side Diff: mojo/dart/dart_snapshotter/test/dart_snapshotter_test.py

Issue 1346773002: Stop running pub get at gclient sync time and fix build bugs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium 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 argparse 6 import argparse
7 import hashlib 7 import hashlib
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
11 import tempfile 11 import tempfile
12 12
13 SNAPSHOT_TEST_DIR = os.path.dirname(os.path.abspath(__file__)) 13 SNAPSHOT_TEST_DIR = os.path.dirname(os.path.abspath(__file__))
14 SRC_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname( 14 SRC_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(
15 SNAPSHOT_TEST_DIR)))) 15 SNAPSHOT_TEST_DIR))))
16 DART_DIR = os.path.join(SRC_ROOT, 'dart') 16 DART_DIR = os.path.join(SRC_ROOT, 'mojo', 'public', 'third_party', 'dart')
17 17
18 VM_SNAPSHOT_FILES=[ 18 VM_SNAPSHOT_FILES=[
19 # Header files. 19 # Header files.
20 'datastream.h', 20 'datastream.h',
21 'object.h', 21 'object.h',
22 'raw_object.h', 22 'raw_object.h',
23 'snapshot.h', 23 'snapshot.h',
24 'snapshot_ids.h', 24 'snapshot_ids.h',
25 'symbols.h', 25 'symbols.h',
26 # Source files. 26 # Source files.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 snapshot_file.seek(20) 74 snapshot_file.seek(20)
75 actual_hash = snapshot_file.read(32) 75 actual_hash = snapshot_file.read(32)
76 if not actual_hash == expected_hash: 76 if not actual_hash == expected_hash:
77 print ('wrong hash: actual = %s, expected = %s' 77 print ('wrong hash: actual = %s, expected = %s'
78 % (actual_hash, expected_hash)) 78 % (actual_hash, expected_hash))
79 return 1 79 return 1
80 return 0 80 return 0
81 81
82 if __name__ == '__main__': 82 if __name__ == '__main__':
83 sys.exit(main()) 83 sys.exit(main())
OLDNEW
« DEPS ('K') | « mojo/dart/dart_snapshotter/main.cc ('k') | mojo/dart/dart_snapshotter/vm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698