All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

OPEN-8: allow specification of the configuration with env var AUTOBUILD_CONFIGURATION

Review Request #141 - Created Feb. 6, 2011 and submitted

Oz Linden Reviewers
viewer
open-8
None autobuild
This patch adds support for specifying the configurations using the AUTOBUILD_CONFIGURATION environment variable (multiple configurations can be specified using commas to separate the values).
Tested manually with and without the command line argument, and with and without the environment variable set; the appropriate configuration values were used.
autobuild/autobuild_base.py
Revision 9ee2db08d677 New Change
... 38 lines hidden [Expand]
def name_from_file(self, filename):
39
        Since an autobuild tool's module filename must conform to a particular
39
        Since an autobuild tool's module filename must conform to a particular
40
        naming convention, and that name must embed the tool's invocation
40
        naming convention, and that name must embed the tool's invocation
41
        name, provide a method to extract the tool name from __file__.
41
        name, provide a method to extract the tool name from __file__.
42
        """
42
        """
43
        basename = os.path.splitext(os.path.basename(filename))[0]
43
        basename = os.path.splitext(os.path.basename(filename))[0]
44
        pfx = "autobuild_tool_"
44
        pfx = "autobuild_tool_"
45
        if basename.startswith(pfx):
45
        if basename.startswith(pfx):
46
            basename = basename[len(pfx):]
46
            basename = basename[len(pfx):]
47
        return basename
47
        return basename
48

   
48

   

   
49
    def configurations_from_environment(self):

   
50
        cfgs=os.environ.get("AUTOBUILD_CONFIGURATION")

   
51
        if cfgs is None:

   
52
            return []

   
53
        else:

   
54
            return cfgs.split(",")

   
55

   
49
# Override these three functions to hook into autobuild.py
56
# Override these three functions to hook into autobuild.py
50

   
57

   
51
    def get_details(self):
58
    def get_details(self):
52
        # name is the tool name - ie 'example' (for use from autobuild.py)
59
        # name is the tool name - ie 'example' (for use from autobuild.py)
53
        # when run from autobuild 'description' forms the help for this subcommand
60
        # when run from autobuild 'description' forms the help for this subcommand
54
        # when run standalone it forms the tool desciption
61
        # when run standalone it forms the tool desciption
55
        return dict(name='', description='')
62
        return dict(name='', description='')
56
    
63
    
57
    def register(self, parser):
64
    def register(self, parser):
58
        pass
65
        pass
... 25 lines hidden [Expand]
autobuild/autobuild_tool_build.py
Revision 9ee2db08d677 New Change
 
autobuild/autobuild_tool_configure.py
Revision 9ee2db08d677 New Change
 
  1. autobuild/autobuild_base.py: Loading...
  2. autobuild/autobuild_tool_build.py: Loading...
  3. autobuild/autobuild_tool_configure.py: Loading...