gclient: Add a test to make sure we're syncing CIPD dependencies.
Bug: 849374 Change-Id: I5654ed65843c6dae6b7dbee10a40aa35e16803dc Reviewed-on: https://chromium-review.googlesource.com/1087390 Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Aaron Gable <agable@chromium.org>changes/90/1087390/3
parent
e89dcf7dee
commit
efe4f897c2
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
base_dir=$(dirname "$0")
|
||||
|
||||
exec python "$base_dir/fake_cipd.py" "$@"
|
@ -0,0 +1,8 @@
|
||||
echo off
|
||||
:: Copyright (c) 2018 The Chromium Authors. All rights reserved.
|
||||
:: Use of this source code is governed by a BSD-style license that can be
|
||||
:: found in the LICENSE file.
|
||||
setlocal
|
||||
|
||||
:: Defer control.
|
||||
python "%~dp0fake_cipd.py" %*
|
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
assert sys.argv[1] == 'ensure'
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-ensure-file')
|
||||
parser.add_argument('-root')
|
||||
args, _ = parser.parse_known_args()
|
||||
|
||||
cipd_root = os.path.join(args.root, '.cipd')
|
||||
if not os.path.isdir(cipd_root):
|
||||
os.makedirs(cipd_root)
|
||||
|
||||
if args.ensure_file:
|
||||
shutil.copy(args.ensure_file, os.path.join(cipd_root, 'ensure'))
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
Loading…
Reference in New Issue