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

Side by Side Diff: test/determinism/gyptest-solibs.py

Issue 1506733002: GYP: Make GYP build deterministic (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Fixes cosmetic issue Created 4 years, 11 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
« no previous file with comments | « test/determinism/gyptest-needed-variables.py ('k') | test/determinism/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2015 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """
8 Verifies builds are the same even with different PYTHONHASHSEEDs.
9 Tests all_targets, implicit_deps and solibs.
10 """
11
12 import os
13 import sys
14 import TestGyp
15
16 test = TestGyp.TestGyp()
17 if test.format == 'ninja':
18 os.environ["PYTHONHASHSEED"] = "1"
19 test.run_gyp('solibs.gyp')
20 base1 = open(test.built_file_path('c.ninja', subdir='obj')).read()
21 base2 = open(test.built_file_path('build.ninja')).read()
22
23 for i in range(1,5):
24 os.environ["PYTHONHASHSEED"] = str(i)
25 test.run_gyp('solibs.gyp')
26 contents1 = open(test.built_file_path('c.ninja', subdir='obj')).read()
27 contents2 = open(test.built_file_path('build.ninja')).read()
28 if base1 != contents1:
29 test.fail_test()
30 if base2 != contents2:
31 print base2
32 test.fail_test()
33
34 del os.environ["PYTHONHASHSEED"]
35 test.pass_test()
OLDNEW
« no previous file with comments | « test/determinism/gyptest-needed-variables.py ('k') | test/determinism/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698