Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMOB-8943: BlackBerry: Add BlackBerry to drillbit scripts #59

Merged
merged 2 commits into from May 30, 2012

Conversation

dlifshitz-maca
Copy link

Reviewers:David C, Harut

[Issues Fixed]
TIMOB-8943: BlackBerry: Add BlackBerry to drillbit scripts
(partial) TIMOB-8944: BlackBerry: Connect drillbit to BB simulator or device

[Added]
devicemanagement.py

[Changes]
blackberry.js

  • function BlackBerrySimulator
    • added member blackberryDeviceManagement
  • added function createDeviceManagementProcess
  • removed unused function getTestHarnessPID, testHarnessNeedsBuild
  • implemented functions isTestHarnessRunning, fillTestTemplateData, pushTestJS, stageSDK, killTestHarness
  • function run
    • create a placeholder process for logs and uncomment the code that uses it
  • functions launchTestHarness, runTestHarness
    • removed unused variable

blackberryndk.py

  • function package
    • added parameter type and use it to package using devMode

builder.py

  • remember and pass along the type

[Tests]
Test 1: Run drillbit

  1. Run scons to build the mobile sdk
  2. Run the following command:
    drillbit\drillbit.py --platforms=blackberry
  3. Click "run tests"
  4. Verify the test_harness app is built, deployed, and run
  5. Close drillbit and repeat Step 2
  6. Verify the test_harness app is closed when drillbit starts

[Issues Fixed]
TIMOB-8943: BlackBerry: Add BlackBerry to drillbit scripts
(partial) TIMOB-8944: BlackBerry: Connect drillbit to BB simulator or device

[Added]
devicemanagement.py

[Changes]
blackberry.js
- function BlackBerrySimulator
  - added member blackberryDeviceManagement
- added function createDeviceManagementProcess
- removed unused function getTestHarnessPID, testHarnessNeedsBuild
- implemented functions isTestHarnessRunning, fillTestTemplateData, pushTestJS, stageSDK, killTestHarness
- function run
  - create a placeholder process for logs and uncomment the code that uses it
- functions launchTestHarness, runTestHarness
  - removed unused variable

blackberryndk.py
- function package
  - added parameter type and use it to package using devMode

builder.py
- remember and pass along the type

[Tests]
Test 1: Run drillbit
1) Run scons to build the mobile sdk
2) Run the following command:
drillbit\drillbit.py --platforms=blackberry
3) Click "run tests"
4) Verify the test_harness app is built, deployed, and run
5) Close drillbit and repeat Step 2
6) Verify the test_harness app is closed when drillbit starts
with open(os.devnull, 'w') as nul:
sys.stdout = nul
tiappxml = TiAppXML(project_tiappxml, True)
sys.stdout = sys.__stdout__
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clean this should save and restore the initial value of sys.stdout and not blindly set it to stdout

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- centralized program names
- make echoing the command optional (default is true)
- if there is a log but no file, output to stdout instead of nowhere
- moved command building from devicemanagement.py to blackberryndk.py
- fixed blackberryndk.py unit tests
- made Builder.type2variantCpu public
- remember stdout and use it
@dlifshitz-maca
Copy link
Author

Updated patch. I'll ask David C to re-review.

@jpl-mac
Copy link

jpl-mac commented May 25, 2012

Thanks David

@Harutyun
Copy link

Approved. Tests are passed.

dlifshitz-maca added a commit that referenced this pull request May 30, 2012
TIMOB-8943: BlackBerry: Add BlackBerry to drillbit scripts
@dlifshitz-maca dlifshitz-maca merged commit 77f29b7 into Macadamian:blackberry May 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants