Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Side by Side Diff: scripts/slave/recipe_modules/webrtc/api.py

Issue 75163006: WebRTC Android APK trybot recipe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2013 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 from slave import recipe_api
6
7 class WebRTCApi(recipe_api.RecipeApi):
8 def __init__(self, **kwargs):
9 super(WebRTCApi, self).__init__(**kwargs)
10 self._env = {}
11
12 def get_config_defaults(self):
13 return {
14 'ANDROID_APK': False,
15 }
16
17 def get_normal_tests(self):
18 return [
19 'audio_decoder_unittests',
20 'common_audio_unittests',
21 'common_video_unittests',
22 'libjingle_media_unittest',
23 'libjingle_p2p_unittest',
24 'libjingle_peerconnection_unittest',
25 'libjingle_sound_unittest',
26 'libjingle_unittest',
27 'metrics_unittests',
28 'modules_tests',
29 'modules_unittests',
30 'neteq_unittests',
31 'system_wrappers_unittests',
32 'test_support_unittests',
33 'tools_unittests',
34 'video_engine_core_unittests',
35 'video_engine_tests',
36 'voice_engine_unittests',
37 ]
iannucci 2013/11/18 18:49:26 I would even just make this a class attribute NORM
kjellander_chromium 2013/11/20 14:29:16 Right, I don't remember why I put it into a method
38
39 def envsetup(self):
40 envsetup_cmd = [self.m.path.checkout('build', 'android', 'envsetup.sh')]
41 # TODO(kjellander): Add support for --target-arch flag to support
42 # non-ARM architecture.
43 cmd = ([self.m.path.build('scripts', 'slave', 'env_dump.py'),
44 '--output-json', self.m.json.output()] + envsetup_cmd)
45 yield self.m.step('envsetup', cmd, env=self._env)
iannucci 2013/11/18 18:49:26 envsetup makes me sad panda :( It would be super
kjellander_chromium 2013/11/20 14:29:16 I don't know the details about this. My primary ta
46
47 env_diff = self.m.step_history.last_step().json.output
48 for key, value in env_diff.iteritems():
49 self._env[key] = value
iannucci 2013/11/18 18:49:26 wdyt about putting this envsetup stuff in a 'base_
kjellander_chromium 2013/11/20 14:29:16 Yes, I'm doing that in the new patch set.
50
51 def runhooks(self, **kwargs):
52 kwargs['env'] = self._env
iannucci 2013/11/18 18:49:26 What do you think about kwargs.setdefault('env',
kjellander_chromium 2013/11/20 14:29:16 For now, I'll rather skip kwargs and let someone a
53 return self.m.chromium.runhooks(**kwargs)
54
55 def compile(self, **kwargs):
56 kwargs['env'] = self._env
57 return self.m.chromium.compile(**kwargs)
58
59 def apply_svn_patch(self):
60 script = self.m.path.build('scripts', 'slave', 'apply_svn_patch.py')
61 args = ['-p', self.m.properties['patch_url'],
62 '-r', self.c.patch_root_dir]
63
64 # Allow manipulating patches for try jobs.
65 if self.c.patch_path_filter_script and self.c.patch_path_filter:
66 args += ['--path-filter', self.c.patch_path_filter,
67 '--path-filter-script', self.c.patch_path_filter_script,
68 '--strip-level', self.c.patch_strip_level]
69 return self.m.python('apply_patch', script, args)
70
71 def runtests(self, test, **kwargs):
iannucci 2013/11/18 18:49:26 This should probably be test_runner. ('runtests' i
kjellander_chromium 2013/11/20 14:29:16 OK. I renamed it in the base_android/api.py
72 script = self.m.path.checkout('build', 'android', 'test_runner.py')
73 args = ['gtest', '-s', test, '--verbose']
74 if self.m.chromium.c.BUILD_CONFIG == 'Release':
75 args += ['--release']
76 return self.m.python(test, script, args, env=self._env)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698