-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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-9379 initial push of Anvil driver for all platforms #2323
Conversation
hold merging for further updates |
Hi Opie, Attached are scripts called from Jenkins Master box. Driver-LP.sh – is core Master script – this is simply called from Jenkins Application with only one param: $GIT_BRANCH. The 'runtest---' scripts run on the slave box as Jenkins slave modules. They are called directly from Jenkins too. NOT as part of the Modules build (as mentioned in previous email) but it is means for offloading any Drillbit application performance hits. The slave module for Drillbit also requires two additional scripts not included here. They are for pre-config and post-processing. Robert Collazo QA Automation Engineer Appcelerator, Inc. rcollazo@appcelerator.commailto:rcollazo@appcelerator.com The Next Generation Mobile Platform http://www.appcelerator.comhttp://www.appcelerator.com/ PLATFORM=ANDROID DATA_TARGET=../testdata-$PLATFORM if [ ! -e $DATA_TARGET ] ====== ANDROID Start Up section =============================================killall logcatkillall emulatorstart logcat - as backgroud process/Users/rcollazo/Downloads/android-sdk-mac_x86/platform-tools/adb -s emulator-5560 logcat &start emuator - need to exec as forground process (???)/Users/rcollazo/Downloads/android-sdk-mac_x86/tools/emulator-arm -avd titanium_4_HVGA -port 5560 -sdcard /Users/rcollazo/.titanium/titanium_4_HVGA.sdcard -logcat :d,,TiAPI:V -no-boot-anim -partition-size 128wait_for_connection # ./ monitor_adb.pyNOTE: this is temp Hack for Android - file bug to package icon -OR- trap File not Found Errorcp -p $HOME/appicon.png /Users/rcollazo/build/workspace/slave_job2/$VERSION_DIR/titanium_mobile/build/drillbit/Drillbit.app/Contents/Resources/test_harness/build/android/bin/assets/Resources/appicon.png =============================================================================./drillbit/drillbit.py --platforms=android --tests=analytics,android.filesystem,android.geolocation,android.kroll,android.network.httpclient,android.notificationmgr,android.platform,android.resources,android.string,codec,database,json,kroll,locale,network,network.httpclient,network.socket,network.socket.tcp,platform,properties,titanium,ui.2dmatrix,ui.controls,yahoo --reset-config --android-runtime=v8 --android-device=emulator-5560 --autorun --results-dir=../testdata-$PLATFORM zip -rq testdata.zip $DATA_TARGET #!/bin/sh PLATFORM=IOS DATA_TARGET=../testdata-$PLATFORM if [ ! -e $DATA_TARGET ] for TEST_NAME in analytics zip -rq testdata.zip $DATA_TARGET #!/bin/sh A hudson Build driver for Titanium Mobilethis is pacakge for Drillbit TestingSLAVE_PACKAGE='slave_package.zip' export PATH=/bin:/usr/bin:$PATH $1 from Jenkins ApplicationGIT_BRANCH=$1 Naming conventions...TARGET_BRANCH=titanium_mobile_$GIT_BRANCH Do Core Buildscons package_all=1 version_tag=$VTAG $TI_MOBILE_SCONS_ARGS if [ "$PYTHON" = "" ]; then Naming conventions...SDK_ARCHIVE="$BASENAME-osx.zip" Name mapping for DIR Paths vs Git Branch NamesTARGET_EXT='master' $GIT_BRANCH_MASTER = "master" = $TARGET_EXTif [ $GIT_BRANCH = '2_0_X' ] if [ $GIT_BRANCH = '1_8_X' ] if [ $GIT_BRANCH = '1_7_X' ] cd $TITANIUM_BUILD/jobs/titanium_mobile_$TARGET_EXT/workspace verify scons created Buildif [ -e "$SDK_ARCHIVE" ] kludge for preserving version number - re-used when unpackaged on slaveecho $VTAG > slave_version.txt if [ -e $SLAVE_PACKAGE ] build minimal package for Drillbit dropzip -rq $SLAVE_PACKAGE slave_version.txt build drillbit if [ -e "tmp_unbundle" ] Unzip Buildmkdir tmp_unbundle Extract additional minimals for Drillbit Packagecd mobilesdk/osx append to Drillbit Packagezip -urq ../$SLAVE_PACKAGE dist/mobilesdk copy and timestamp the Drillbit Package for short term archivecd $TITANIUM_BUILD/jobs/titanium_mobile_$TARGET_EXT/workspace push core Build packages to Amazon S3 buckets$PYTHON $TITANIUM_BUILD/common/s3_cleaner.py mobile $GIT_BRANCH |
… web support, initial push or test suites and numerous other architecture changes
Will CR + iOS FR. |
added to the "harnessTemplate/Resources/suites" directory. An example/template for a suite exists at the top | ||
level driver directory. | ||
|
||
In order to add new tests to a suite, the test should be added to the "tests" array within the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary for the initial rev, but it would be good to autogenerate this (or dynamically determine at runtime) in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given the static nature of a suite file I didn't think it was strong enough reason to justify getting into code generation. I am open to further discussion on this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of those things that might need to change in a later rev if we add user-defined tests for their own harness/app for testing their individual components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I will feel better crossing that bridge when we get closer to that and have some more concrete user stories / full picture. Personally I would rather avoid over designing for future behavior we don't have a full picture of yet. We might address a change here but I think we should leave this be for the time being since it's simple, obvious, extremely low overhead and works. My 2 cents.
Going to hold further review at @DizzyMonkey's request |
… update to test suites in order to support stronger test specific scopes
this.createHarness = function(platform, command, successCallback, errorCallback) { | ||
var createCallback = function() { | ||
try { | ||
fs.mkdirSync(driverGlobal.tempDir + "/harness/" + platform, 0777); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be explicitly require()
ing node.js components which may be loaded by other commonjs modules? Seems like good practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this previously (and just verified again) and the required module cannot be seen inside other required modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is incredibly stupid. Did you file a bug with node?
refer to README file for more info on configurations | ||
NOTE: please refer to node.js documentation for info on "__dirname" | ||
*/ | ||
this.harnessConfigsDir = ""; // location of the harness configurations; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably safely point to the example above, since most people will be running the included test suite with the provided configs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Yeah, that is accidental as the configs dir really shouldn't be a item in the cfg file since that is part of the checked in test content. This might change in the future but for now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually removed several items from the config file in order to follow a "less rope" mindset and have the config file put more focus on properties that actually need attention. I also included very minor updates to the README to support some of the changes to the example config file.
Done with initial review, will wait for more updates. General comments:
|
|
||
var platform = util.getArgument(process.argv, "--platform"); | ||
try { | ||
driverGlobal.platform = require(__dirname + "/platforms/" + platform); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a sanity check here in case the platform isn't provided, (is undefined
) so that usage
can be displayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usage is already displayed if the platform argument is not displayed or if the platform is unrecognized (fails to load module). The error though is a general fail to load error and I have updated to provide more focused logging and error handling.
iOS functional test; the tests ran with the default configuration (124 pass 19 fail) but there is an issue. When ios-sim crashes/aborts because it can't start a simulator in time, anvil seems to not respond. The message is
Although this is hard to reproduce. It may be the case that we need to return a specific error code from ios-sim and anvil needs to look for it. |
process.exit(1); | ||
} | ||
|
||
var configString = fs.readFileSync(configFilePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just have the config file as a module that we can require(). That way we don't have to do all this sync file reading and evaling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon further thought, I went ahead and changed the config to a required module.
driver/driver.cfg (or whatever it's going to be called) should be added to the .gitignore file. |
…nization and fix porting issues
… the json test suite
Got the following error during a functional test:
This was from an old-style config migrated to a |
Unable to reproduce the |
Maybe we can fit this in before merge:
Future "nice to haves":
|
Functional tested ios and code reviewed; a few more comments. |
Two more high-profile failures for ios/os x:
|
My log files are also empty, btw. |
After the latest update, ios is no longer reporting results:
|
Functional tested & code reviewed for ios. APPROVED. |
cr/fr accepted |
Code reviewed and tested. Accepted. |
TIMOB-9379 initial push of Anvil driver for all platforms
Test instructions for this are limited to running the driver against all 3 platforms to ensure that the test suites are executed properly.
Once node.js is installed, inside the support/driver directory run:
Repeat the above steps for both iOS and Mobile Web. For iOS, the simulator will be started.
** For mobile web, an Android device must be connected and seen by ADB but also the device must have access to the wifi network and be able to see the node.js web server being run by the driver.
Whoever does the functional test for MW might just want to talk to me regarding the setup.