16997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org#!/usr/bin/env python
26997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
33c02308fe834c7af49f1557ac3d56be58a9b1fc7tony@chromium.org# Copyright (c) 2012 Google Inc. All rights reserved.
46997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org# Use of this source code is governed by a BSD-style license that can be
56997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org# found in the LICENSE file.
66997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
76997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org"""
8f798208936eb91d4d378a65dab79f76b54bcfd1ctony@chromium.orgVerifies that .d files and all.deps are properly generated.
96997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org"""
106997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
116997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.orgimport TestGyp
126997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
13f798208936eb91d4d378a65dab79f76b54bcfd1ctony@chromium.org# .d files are only used by the make build.
146997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.orgtest = TestGyp.TestGyp(formats=['make'])
156997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
166997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.orgtest.run_gyp('dependencies.gyp')
176997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
186997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.orgtest.build('dependencies.gyp', test.ALL)
196997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
20023d71b91d502f776f67c9fced435601070a4349evan@chromium.orgdeps_file = test.built_file_path(".deps/out/Default/obj.target/main/main.o.d")
216997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.orgtest.must_contain(deps_file, "main.h")
226997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
236997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org# Build a second time to make sure we generate all.deps.
246997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.orgtest.build('dependencies.gyp', test.ALL)
256997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.org
266997374fe9106a1bd5986b80deb898f06cfe59c9tony@chromium.orgtest.pass_test()
27