1# Copyright 2017 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6# Recipe which runs the Skia gsutils tests.
7
8
9DEPS = [
10  'gsutil',
11  'recipe_engine/path',
12  'recipe_engine/properties',
13  'recipe_engine/python',
14  'recipe_engine/step',
15  'run',
16  'vars',
17]
18
19
20def RunSteps(api):
21  api.vars.setup()
22  api.gsutil.cp('test file', '/foo/file', 'gs://bar-bucket/file',
23                extra_args=['-Z'], multithread=True)
24
25def GenTests(api):
26  yield (
27      api.test('gsutil_tests') +
28      api.properties(buildername='Housekeeper-PerCommit-InfraTests',
29                     repository='https://skia.googlesource.com/skia.git',
30                     revision='abc123',
31                     path_config='kitchen',
32                     swarm_out_dir='[SWARM_OUT_DIR]')
33  )
34
35  yield (
36      api.test('gsutil_win_tests') +
37      api.properties(buildername='Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-All',
38                     repository='https://skia.googlesource.com/skia.git',
39                     revision='abc123',
40                     path_config='kitchen',
41                     swarm_out_dir='[SWARM_OUT_DIR]')
42  )
43
44  yield (
45    api.test('failed_one_upload') +
46      api.properties(buildername='Housekeeper-PerCommit-InfraTests',
47                     repository='https://skia.googlesource.com/skia.git',
48                     revision='abc123',
49                     path_config='kitchen',
50                     swarm_out_dir='[SWARM_OUT_DIR]') +
51    api.step_data('upload test file', retcode=1)
52  )
53
54  yield (
55    api.test('failed_all_uploads') +
56      api.properties(buildername='Housekeeper-PerCommit-InfraTests',
57                     repository='https://skia.googlesource.com/skia.git',
58                     revision='abc123',
59                     path_config='kitchen',
60                     swarm_out_dir='[SWARM_OUT_DIR]') +
61    api.step_data('upload test file', retcode=1) +
62    api.step_data('upload test file (attempt 2)', retcode=1) +
63    api.step_data('upload test file (attempt 3)', retcode=1) +
64    api.step_data('upload test file (attempt 4)', retcode=1) +
65    api.step_data('upload test file (attempt 5)', retcode=1)
66  )
67