3 # Copyright (c) 2012 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.
8 Make sure we don't cause unnecessary builds due to import libs appearing
18 if sys.platform == 'win32':
19 test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
21 if not os.environ.get('ProgramFiles(x86)'):
23 print 'Skipping test on x86, http://crbug.com/365833'
27 test.run_gyp('importlib.gyp', chdir=CHDIR)
28 test.build('importlib.gyp', test.ALL, chdir=CHDIR)
30 # Delay briefly so that there's time for this touch not to have the
31 # timestamp as the previous run.
34 # Touch the .cc file; the .dll will rebuild, but the import libs timestamp
36 test.touch('importlib/has-exports.cc')
37 test.build('importlib.gyp', 'test_importlib', chdir=CHDIR)
39 # This is the important part. The .dll above will relink and have an updated
40 # timestamp, however the import .libs timestamp won't be updated. So, we
41 # have to handle restating inputs in ninja so the final binary doesn't
42 # continually relink (due to thinking the .lib isn't up to date).
43 test.up_to_date('importlib.gyp', test.ALL, chdir=CHDIR)