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-57: Allow override of the autobuild platform for configuration testing

Review Request #253 - Created April 6, 2011 and submitted

Oz Linden Reviewers
viewer
open-57 brad.linden, alain_linden
None autobuild
When merging the changes for OPEN-50, I found that I wanted to be able to use the --dry-run option to see what system commands would be executed for the configure and build sub-commands on each of the platforms. At present, the platform used is always the real local platform, but I wanted to be able to override that so that I could see how a configuration change would affect the system commands used on a different platform.

Adding a command line argument for this would have been quite complex, since it would have meant adding the args down through all the possible routes (including possible recursive autobuild invocations) to the low level routine that reads the python sys.platform and translates the name to the autobuild conventional names.  Especially given that this should be relatively rarely used, that complexity did not seem justified.

Instead, I added an environment variable AUTOBUILD_PLATFORM_OVERRIDE that may be set to the desired autobuild conventional platform name; if that is set, then it is used directly and if not then the sys.platform value is translated as before.  It's a one line change.
Execute --dry-run commands preceded by 'AUTOBUILD_PLATFORM_OVERRIDE=linux' (and for 'windows') on a Mac, and observed that the echoed commands changed appropriately; also observed that overriding to the local platform produced the same command as produced when no override was used.
Review request changed
Updated (April 6, 2011, 3:32 a.m.)
  • changed from Allow override of the autobuild platform for configuration testing to OPEN-57: Allow override of the autobuild platform for configuration testing
Ship it!
Posted (April 6, 2011, 4:11 a.m.)
Looks good