14f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org#!/usr/bin/env python 24f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 3df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org# Copyright (c) 2009 Google Inc. All rights reserved. 4df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org# Use of this source code is governed by a BSD-style license that can be 5df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org# found in the LICENSE file. 6df8224662e615bd36cf8bebae8e58c017201f998sgk@chromium.org 74f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org""" 84f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.orgVerifies file copies using an explicit build target of 'all'. 94f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org""" 104f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 114f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.orgimport TestGyp 124f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 134f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.orgtest = TestGyp.TestGyp() 144f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 154f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.orgtest.run_gyp('copies.gyp', chdir='src') 164f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 17fa5b46b96b21ff75d8b6b3dacc4693b69c43654csgk@chromium.orgtest.relocate('src', 'relocate/src') 184f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 19040d50e7277c41a0b9641dc42c76be8605055637sgk@chromium.orgtest.build('copies.gyp', test.ALL, chdir='relocate/src') 204f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 212e1293c2505a6215a723d89fcb6897a8a7c61bd9sgk@chromium.orgtest.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n') 222e1293c2505a6215a723d89fcb6897a8a7c61bd9sgk@chromium.org 232e1293c2505a6215a723d89fcb6897a8a7c61bd9sgk@chromium.orgtest.built_file_must_match('copies-out/file2', 242e1293c2505a6215a723d89fcb6897a8a7c61bd9sgk@chromium.org 'file2 contents\n', 252e1293c2505a6215a723d89fcb6897a8a7c61bd9sgk@chromium.org chdir='relocate/src') 264f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.org 273b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.comtest.built_file_must_match('copies-out/directory/file3', 283b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com 'file3 contents\n', 293b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com chdir='relocate/src') 303b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.comtest.built_file_must_match('copies-out/directory/file4', 313b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com 'file4 contents\n', 323b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com chdir='relocate/src') 333b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.comtest.built_file_must_match('copies-out/directory/subdir/file5', 343b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com 'file5 contents\n', 353b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com chdir='relocate/src') 363b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.comtest.built_file_must_match('copies-out/subdir/file6', 373b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com 'file6 contents\n', 383b6138af6a84321fcd883e0ac1e9db2bcfc75698bradnelson@google.com chdir='relocate/src') 3916549223553781ae675c6e45d998ae6cd5365e99mmoss@chromium.org 404f6c7bda24f785ad4a7a3e084c5999329dc05660sgk@chromium.orgtest.pass_test() 41