[opensource-dev] Review Request: Allow override of the autobuild platform for configuration testing

Oz Linden oz at lindenlab.com
Wed Apr 6 03:32:20 PDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/253/
-----------------------------------------------------------

Review request for Viewer, Brad Kittenbrink and Alain Linden.


Summary
-------

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.


This addresses bug open-57.
    http://jira.secondlife.com/browse/open-57


Diffs
-----

  autobuild/common.py 5067ba42a9c8 

Diff: http://codereview.secondlife.com/r/253/diff


Testing
-------

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.


Thanks,

Oz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20110406/03382931/attachment-0001.htm 


More information about the opensource-dev mailing list