Macadamian/titanium_mobile — pull request #33 by dlifshitz-maca (2012-04-20 19:41:51+00:00)
Title: TIMOB-8737: Blackberry: Log build commands and output to the build log file

[Issues Fixed]
TIMOB-8737: Blackberry: Log build commands and output to the build log file

[Changed]
blackberryndk.py
- function __init__
- added parameter stdout
- function _run
- change check_output to check_call and pass in the stdout parameter
- function __main__
- add code to debug unit tests

builder.py
- function __main__
- open a log file and pass it to the logger and BlackberryNDK

[Tests]
Test 1: use scripts
1) Run the following command:
project.py HelloWorldDisplay com.macadamian.helloworlddisplay C:\dev\test blackberry
2) Verify there are no errors and the files were copied/imported
3) Run the following command:
blackberry\builder.py build -t simulator -d C:\dev\test\HelloWorldDisplay -p C:\bbndk-2.0.0
4) Verify there are no errors and the .bar file was created
5) Verify the build.log file contains

Test 2: unit tests
1) Run the following command:
blackberry\blackberryndk.py -t
2) Verify all tests pass and no output was written
3) Uncomment the debug line
4) Verify all tests pass and output was written to stdout