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

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

Issue 1506733002: GYP: Make GYP build deterministic (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Shrinks test case down, more thorough testing. Created 5 years 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
« pylib/gyp/ninja_syntax.py ('K') | « test/determinism/determinism.gyp ('k') | no next file » | 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 """
10
11 import os
12 import sys
13 import TestGyp
14
15 test = TestGyp.TestGyp()
16 if test.format == 'ninja':
17 os.environ["PYTHONHASHSEED"] = "1"
18 test.run_gyp('determinism.gyp')
19 base = open(test.built_file_path('build.ninja')).read()
20
21 for i in range(1,5):
22 os.environ["PYTHONHASHSEED"] = str(i)
23 test.run_gyp('determinism.gyp')
24 contents = open(test.built_file_path('build.ninja')).read()
25 if base != contents:
26 test.fail_test()
27
28 del os.environ["PYTHONHASHSEED"]
29 test.pass_test()
OLDNEW
« pylib/gyp/ninja_syntax.py ('K') | « test/determinism/determinism.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698