Home | History | Annotate | Download | only in recipes
      1 # Copyright 2018 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 # Recipe module for Skia Swarming SKQP testing.
      6 
      7 DEPS = [
      8   'flavor',
      9   'recipe_engine/file',
     10   'recipe_engine/path',
     11   'recipe_engine/properties',
     12   'run',
     13   'vars',
     14 ]
     15 
     16 def test_firebase_steps(api):
     17   """Test an APK on Firebase Testlab."""
     18   wlist_file = api.vars.slave_dir.join('whitelist_devices.json')
     19   apk_file = api.vars.slave_dir.join('out','devrel','skqp-universal-debug.apk')
     20   upload_path = 'skia-stephana-test/testing/skqp-universal-debug.apk'
     21   args = [
     22     'run_testlab',
     23     '--logtostderr',
     24     '--devices', wlist_file,
     25     '--upload_path', upload_path,
     26     apk_file
     27   ]
     28   api.run(api.flavor.step, 'run firebase testlab', cmd=args)
     29 
     30 def RunSteps(api):
     31   api.vars.setup()
     32   api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
     33   api.flavor.setup()
     34 
     35   test_firebase_steps(api)
     36   api.run.check_failure()
     37 
     38 def GenTests(api):
     39   builder = 'Test-Debian9-Clang-GCE-CPU-AVX2-universal-devrel-All-Android_SKQP'
     40   yield (
     41       api.test(builder) +
     42       api.properties(buildername=builder,
     43                      buildbucket_build_id='123454321',
     44                      revision='abc123',
     45                      path_config='kitchen',
     46                      swarm_out_dir='[SWARM_OUT_DIR]')
     47   )
     48