2017-04-19 17:36:00 +00:00
|
|
|
# Copyright 2017 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.
|
|
|
|
|
|
|
|
|
|
|
|
DEPS = [
|
|
|
|
'flavor',
|
|
|
|
'recipe_engine/properties',
|
|
|
|
'recipe_engine/raw_io',
|
|
|
|
'run',
|
|
|
|
'vars',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-04-19 18:39:21 +00:00
|
|
|
def test_exceptions(api):
|
|
|
|
try:
|
|
|
|
api.flavor.copy_directory_contents_to_device('src', 'dst')
|
|
|
|
except ValueError:
|
|
|
|
pass
|
|
|
|
try:
|
|
|
|
api.flavor.copy_directory_contents_to_host('src', 'dst')
|
|
|
|
except ValueError:
|
|
|
|
pass
|
|
|
|
try:
|
|
|
|
api.flavor.copy_file_to_device('src', 'dst')
|
|
|
|
except ValueError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2017-04-19 17:36:00 +00:00
|
|
|
def RunSteps(api):
|
|
|
|
api.vars.setup()
|
|
|
|
api.flavor.setup()
|
|
|
|
|
2017-04-19 18:39:21 +00:00
|
|
|
if api.properties.get('is_testing_exceptions') == 'True':
|
|
|
|
return test_exceptions(api)
|
|
|
|
|
2017-04-19 17:36:00 +00:00
|
|
|
api.flavor.compile('dm')
|
|
|
|
api.flavor.copy_extra_build_products(api.vars.swarming_out_dir)
|
2017-04-29 01:59:04 +00:00
|
|
|
assert str(api.flavor.out_dir) != ''
|
2017-04-19 17:36:00 +00:00
|
|
|
if 'Build' not in api.properties['buildername']:
|
|
|
|
try:
|
|
|
|
api.flavor.copy_file_to_device('file.txt', 'file.txt')
|
|
|
|
api.flavor.create_clean_host_dir('results_dir')
|
|
|
|
api.flavor.create_clean_device_dir('device_results_dir')
|
|
|
|
api.flavor.install_everything()
|
|
|
|
api.flavor.step('dm', ['dm', '--some-flag'])
|
|
|
|
api.flavor.copy_directory_contents_to_host(
|
|
|
|
api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
|
|
|
|
api.flavor.copy_directory_contents_to_host(
|
|
|
|
api.flavor.device_dirs.perf_data_dir, api.vars.perf_data_dir)
|
|
|
|
finally:
|
|
|
|
api.flavor.cleanup_steps()
|
|
|
|
api.run.check_failure()
|
|
|
|
|
|
|
|
|
|
|
|
TEST_BUILDERS = [
|
2017-07-20 14:21:38 +00:00
|
|
|
'Build-Debian9-Clang-arm-Release-Android_API26',
|
2017-04-19 17:36:00 +00:00
|
|
|
'Build-Mac-Clang-arm64-Debug-Android_Vulkan',
|
|
|
|
'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
|
|
|
|
'Build-Ubuntu-Clang-x86_64-Release-Mini',
|
|
|
|
'Build-Ubuntu-Clang-x86_64-Release-Shared',
|
|
|
|
'Build-Ubuntu-Clang-x86_64-Release-Vulkan',
|
|
|
|
'Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE',
|
|
|
|
'Build-Ubuntu-GCC-x86_64-Release-ANGLE',
|
|
|
|
'Build-Ubuntu-GCC-x86_64-Release-Fast',
|
|
|
|
'Build-Ubuntu-GCC-x86_64-Release-Flutter_Android',
|
|
|
|
'Build-Ubuntu-GCC-x86_64-Release-Mesa',
|
|
|
|
'Build-Ubuntu-GCC-x86_64-Release-PDFium',
|
|
|
|
'Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths',
|
Stop adding Android-specific defines to SkUserConfig
Remove #defines that lived in gn_to_bp.py and
android_framework_defines.gni. These have been moved into a new file
in Android, SkUserConfigManual.h, in https://googleplex-android-review.git.corp.google.com/#/c/2519600/
Update gn_to_bp.py to include SkUserConfigManual.h, so it will still
result in using the same #defines.
Lately, we've found it difficult to guard changes behind a flag. e.g.
a change to drawing causes a CTS failure in Android, so we have to do
the following:
- put the change behind a flag, and add it to gn_to_bp.py or
android_framework_defines.gni
- generate new images on Android (by running CTS with external/skia
modified to not define the flag)
- create a CL in CTS that uses the new images
- land a CL in Skia that stops defining the flag
- when the Skia change lands, wait for the auto-roller to create a CL
that includes the change, stop the auto-roller, add the topic to the CTS
CL so the two can land at the same time
- land both Android changes (with TreeHugger)
- restart the Android auto-roller
With SkUserConfigManual.h (which lives in Android), the process will
be similar to Chromium:
- land a CL in Android's external/skia that defines a flag e.g.
SK_SUPPORT_LEGACY_FEATURE. Land without TreeHugger because it isn't used
in Skia and does not do anything
- land a change in Skia that changes behavior unless
SK_SUPPORT_LEGACY_FEATURE is defined. This will safely go through the
Android roll and not change any behavior for Android
- create two Android CLs - one in CTS to use the new images, and one in
external/skia to delete SK_SUPPORT_LEGACY_FEATURE. Set them to the same
topic and land them with TreeHugger
In the new process, there is no need to mess with the Android roll.
A downside to the new process is that we cannot test the android
framework defines without checking in to Android. But given how much
we've progressed in automating Android testing, this is fine.
Bug: b/63429612
Change-Id: Idfbaef2f4cae641a75fb6e7bf70428733a441336
Reviewed-on: https://skia-review.googlesource.com/22072
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-07-11 19:53:41 +00:00
|
|
|
'Build-Win-Clang-arm64-Release-Android',
|
2017-04-19 17:36:00 +00:00
|
|
|
'Build-Win-MSVC-x86_64-Debug-GDI',
|
|
|
|
'Build-Win-MSVC-x86_64-Debug-NoGPU',
|
|
|
|
'Build-Win-MSVC-x86_64-Release-Exceptions',
|
|
|
|
'Build-Win-MSVC-x86_64-Release-Vulkan',
|
2017-07-28 11:35:28 +00:00
|
|
|
'Housekeeper-PerCommit-CheckGeneratedFiles',
|
2017-04-19 17:36:00 +00:00
|
|
|
'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android',
|
|
|
|
'Perf-ChromeOS-Clang-Chromebook_513C24_K01-GPU-MaliT860-arm-Release',
|
|
|
|
'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release',
|
|
|
|
'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN',
|
|
|
|
'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-MSAN',
|
|
|
|
'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release',
|
|
|
|
('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-'
|
|
|
|
'Valgrind_AbandonGpuContext'),
|
|
|
|
'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug',
|
|
|
|
'Test-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Debug',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def GenTests(api):
|
|
|
|
for buildername in TEST_BUILDERS:
|
|
|
|
test = (
|
|
|
|
api.test(buildername) +
|
|
|
|
api.properties(buildername=buildername,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]')
|
|
|
|
)
|
|
|
|
if 'Chromebook' in buildername:
|
|
|
|
test += api.step_data(
|
|
|
|
'read chromeos ip',
|
|
|
|
stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
|
2017-06-01 19:49:41 +00:00
|
|
|
if 'Chromecast' in buildername:
|
|
|
|
test += api.step_data(
|
|
|
|
'read chromecast ip',
|
|
|
|
stdout=api.raw_io.output('192.168.1.2:5555'))
|
2017-04-19 17:36:00 +00:00
|
|
|
yield test
|
|
|
|
|
2017-04-19 18:39:21 +00:00
|
|
|
builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release'
|
|
|
|
yield (
|
|
|
|
api.test('exceptions') +
|
|
|
|
api.properties(buildername=builder,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]',
|
|
|
|
is_testing_exceptions='True')
|
|
|
|
)
|
|
|
|
|
2017-04-19 17:36:00 +00:00
|
|
|
builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android'
|
|
|
|
yield (
|
|
|
|
api.test('failed_infra_step') +
|
|
|
|
api.properties(buildername=builder,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]') +
|
|
|
|
api.step_data('dump log', retcode=1)
|
|
|
|
)
|
|
|
|
|
|
|
|
builder = 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android'
|
|
|
|
yield (
|
|
|
|
api.test('failed_read_version') +
|
|
|
|
api.properties(buildername=builder,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]') +
|
|
|
|
api.step_data('read /sdcard/revenge_of_the_skiabot/SK_IMAGE_VERSION',
|
|
|
|
retcode=1)
|
|
|
|
)
|