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

Side by Side Diff: scripts/master/factory/annotator_factory.py

Issue 1883503003: annotator_commands: allow running different annotated scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « scripts/master/factory/annotator_commands.py ('k') | scripts/master/factory/commands.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Utility class to generate and manage a factory to be passed to a 5 """Utility class to generate and manage a factory to be passed to a
6 builder dictionary as the 'factory' member, for each builder in c['builders']. 6 builder dictionary as the 'factory' member, for each builder in c['builders'].
7 7
8 Specifically creates a basic factory that will execute an arbirary annotator 8 Specifically creates a basic factory that will execute an arbirary annotator
9 script. 9 script.
10 """ 10 """
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 forcibly killed. 47 forcibly killed.
48 """ 48 """
49 factory_properties = factory_properties or {} 49 factory_properties = factory_properties or {}
50 if recipe: 50 if recipe:
51 factory_properties.update({'recipe': recipe}) 51 factory_properties.update({'recipe': recipe})
52 self._factory_properties = factory_properties 52 self._factory_properties = factory_properties
53 factory = BuildFactory(build_inherit_factory_properties=False) 53 factory = BuildFactory(build_inherit_factory_properties=False)
54 factory.properties.update(self._factory_properties, 'AnnotatorFactory') 54 factory.properties.update(self._factory_properties, 'AnnotatorFactory')
55 cmd_obj = annotator_commands.AnnotatorCommands( 55 cmd_obj = annotator_commands.AnnotatorCommands(
56 factory, active_master=self.active_master) 56 factory, active_master=self.active_master)
57 cmd_obj.AddAnnotatedScript(timeout=timeout, max_time=max_time) 57
58 runner = cmd_obj.PathJoin(cmd_obj.script_dir, 'annotated_run.py')
59 cmd = [cmd_obj.python, '-u', runner, '--use-factory-properties-from-disk']
60 cmd = cmd_obj.AddB64GzBuildProperties(cmd)
61
62 cmd_obj.AddAnnotatedScript(cmd, timeout=timeout, max_time=max_time)
58 63
59 for t in triggers or []: 64 for t in triggers or []:
60 factory.addStep(commands.CreateTriggerStep( 65 factory.addStep(commands.CreateTriggerStep(
61 t, trigger_copy_properties=['swarm_hashes'])) 66 t, trigger_copy_properties=['swarm_hashes']))
62 67
63 return factory 68 return factory
OLDNEW
« no previous file with comments | « scripts/master/factory/annotator_commands.py ('k') | scripts/master/factory/commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698