You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/12/02 15:58:03 UTC

[1/7] cordova-medic git commit: splits master.cfg according to INFRA's buildbot configuration

Repository: cordova-medic
Updated Branches:
  refs/heads/master 0ba57fd97 -> 24b277dac


splits master.cfg according to INFRA's buildbot configuration

* split master.cfg into master.cfg, projects.conf and cordova.conf
* integrate changes from CB-8091 and CB-8099 commits
* update readme according to new configuration files structure


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/784c8844
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/784c8844
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/784c8844

Branch: refs/heads/master
Commit: 784c8844b7d8a5fde3399235d46e617027c31cb2
Parents: 0ba57fd
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Mon Dec 1 16:01:05 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Dec 2 12:12:59 2014 +0300

----------------------------------------------------------------------
 README.md     |  23 ++-
 cordova.conf  | 352 +++++++++++++++++++++++++++++++++
 master.cfg    | 560 ++++++++++++++++++++---------------------------------
 projects.conf |  10 +
 4 files changed, 591 insertions(+), 354 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/784c8844/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index d113244..078b829 100644
--- a/README.md
+++ b/README.md
@@ -65,16 +65,19 @@ medic requires grunt-cli npm package to be installed globally. You can install i
   - On Windows
     - buildslave create-slave slave_windows localhost:9889 cordova-windows-slave pass
  
-6. Get three files from the medic repository
-  - master.cfg - copy to buildbot/master/master.cfg
-  - repos.json - copy to the buildbot base directory
-  - config.json.sample -  copy to the buildbot base directory, then edit for local ip, test platforms, ios keychain, current release build
-
-7. Update config.json
-  - Replace `http://localcouchdb:5984` with CouchDB host address
+6. Copy the following files from the medic repository to buildbot master directory:
+  - master.cfg
+  - projects.conf
+  - cordova.conf
+  - repos.json
+  - config.json.sample
+
+  Then update config.json.sample with CouchDB host address, test platforms, ios keychain, current release build and _rename_ it to config.json
   
   **Note:** couchdb host must be specified via ip address due to windows platform restrictions.
 
+  **Note 2:** config.json and repos.json files should be placed near cordova.conf (for local Medic instance in most cases this means that they need to be placed in BuildBot master directory).
+
 #Running the System
 - start the master with ~buildbot start master
 - start the slaves with:
@@ -145,6 +148,12 @@ The tests use COHO and CLI for as much as possible to ensure that the developer
 **master.cfg:** The main configuration file for buildbot. It is a python script and defines the triggers, builders and status display.
 It uses both config.json and repos.json to determine which platforms and versions to test.
 
+**projects.conf** Configuration script used to load per-project buildbot configurations.
+
+**cordova.conf** Configuration script that contains cordova project-specific buldbot configuration (Build steps, schedulers, build factories definitions, etc.)
+
+The two files above (_projects.conf_ and _cordova.conf_ are necessary to maintain compatibility with Apache Buildbot configuration files structure)
+
 **config.json:** Used by the buildbot master script and by some of the medic command-line tools. 
 It defines the platforms to test, the current release version, the couchdb url, and the ios keychain. 
 The release version specified here is used anywhere the keyword "RELEASE" is used in a test definition.

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/784c8844/cordova.conf
----------------------------------------------------------------------
diff --git a/cordova.conf b/cordova.conf
new file mode 100644
index 0000000..ac176fc
--- /dev/null
+++ b/cordova.conf
@@ -0,0 +1,352 @@
+#!/usr/bin/python
+
+# This is the config file for the Cordova project.
+# NOTE: The f_cor_1 build runs on ASF slave. Newer builds and schedulers 
+# added on 26th Nov 2014 are for external slaves (currently)
+
+
+import json
+with open(FP + "config.json") as f:
+    json_config = json.load(f)
+
+with open(FP + "repos.json") as f:
+    json_repos = json.load(f)
+
+
+# set some variables
+
+platform_list = json_config['app']['platforms']
+branch_release = str(json_config['app']['release'])
+build_timeout = json_config['app']['timeout']
+
+build_android = ('android' in platform_list)
+build_chrome = ('chrome' in platform_list)
+build_ios = ('ios' in platform_list)
+build_wp8 = ('wp8' in platform_list)
+build_windows8 = ('windows8' in platform_list)
+build_blackberry = ('blackberry' in platform_list)
+projectbranches = ['master', branch_release]
+polltime = 300
+stabletime = 30
+# GitPoller on Windows fails if gitbin location is not provided.
+# Set git location if running medic master on Windows
+git_bin = ""  #"c:\Program Files (x86)\Git\cmd\git.exe"
+
+repos = {}
+branches = {}
+
+for jrepo in json_repos['repos']:
+    title = str(jrepo["title"])
+    repo_url = str(jrepo['repo'])
+    category = str(jrepo['category'])
+    repos[title] = repo_url
+    branches[title] = str(jrepo['current'])
+
+# schedulers
+
+from buildbot.schedulers.basic import SingleBranchScheduler
+from buildbot.schedulers.forcesched import ForceScheduler
+from buildbot.changes import filter
+
+builders = []
+force_builders = []
+c['schedulers'] = []
+
+for test in json_repos['tests']:
+    if test["platform"] in platform_list:
+        if type(test["builder"]) == list:
+            builders = [str(b) for b in test["builder"]]
+        else:
+            builders = [str(test["builder"])]
+
+        force_builders.extend(builders)
+
+        c['schedulers'].append(SingleBranchScheduler(
+                               name=str(test["title"]),
+                               change_filter=filter.ChangeFilter(branch=test["branch"], project=test["categories"]),
+                               treeStableTimer=stabletime,
+                               builderNames=builders))
+
+c['schedulers'].append(ForceScheduler(name="force", builderNames=force_builders))
+
+# new build steps
+
+cli_steps = [
+    ShellCommand(command=["git", "clone", "-b", branches['CLI'], repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Get CLI'),
+    ShellCommand(command=["mkdir", "node_modules"], workdir='build/cordova-cli', haltOnFailure=True, description='Prepare cordova-lib'),
+    ShellCommand(command=["git", "clone", "-b", branches['CORDOVA-LIB'], repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Update cordova-lib'),
+    ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../../cordova-lib/cordova-lib', 'cordova-lib', 'dir')"], workdir='build/cordova-cli/node_modules', haltOnFailure=False, description='Link cordova-lib'),
+    ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-cli/node_modules/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
+    ShellCommand(command=["rm", "-f", "npm-shrinkwrap.json"], workdir='build/cordova-cli', haltOnFailure=False, description='Remove CLI SW'),
+    ShellCommand(command=["npm", "install"], workdir='build/cordova-cli', haltOnFailure=True, description='Install CLI'),
+    ShellCommand(command=["npm", "test"], workdir='build/cordova-cli', haltOnFailure=True, description='Test CLI'),
+]
+
+plugman_steps = [
+    ShellCommand(command=["rm", "-rf", "cordova-*"], workdir='build', haltOnFailure=False, description='Cordova Clean'),
+    ShellCommand(command=["git", "clone", repos['PLUGMAN'], "cordova-plugman"], workdir='build', haltOnFailure=True, description='Get Plugman'),
+    ShellCommand(command=["npm", "install"], workdir='build/cordova-plugman', haltOnFailure=True, description='Install Plugman'),
+    ShellCommand(command=["npm", "test"], workdir='build/cordova-plugman', haltOnFailure=True, description='Test Plugman'),
+]
+
+class PlatformTestBase(object):
+    def __init__(self, platform):
+        self.platform = platform
+
+    def init_workspace_steps(self):
+        return [
+            ShellCommand(command=["rm", "-rf", "~/.cordova/" + self.platform], workdir='build', haltOnFailure=False, description='Remove cache'),
+            ShellCommand(command=["rm", "-rf", "medic", "mobilespec", "cordova-mobile-spec", "cordova-coho", "cordova-cli", "cordova-lib"], workdir='build', haltOnFailure=False, description='Clean workdir'),
+            ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic'),
+            # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
+            ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic'),
+            FileDownload(mastersrc=FP+"config.json", slavedest="medic/config.json", haltOnFailure=True),
+            FileDownload(mastersrc=FP+"repos.json", slavedest="medic/repos.json", haltOnFailure=True),
+            ShellCommand(command=["git", "clone", repos['COHO']], workdir='build', haltOnFailure=True, description='Get COHO'),
+            ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-coho', haltOnFailure=True, description='Install COHO'),
+        ]
+
+    def repos_clone_steps(self):
+        platform = self.platform
+        # required by coho tools to correctly resolve repo location
+        if platform == "blackberry10":
+            platform = "blackberry"
+        if platform == "windows8":
+            platform = "windows"
+        return [
+            ShellCommand(command=["./cordova-coho/coho", "repo-clone", "-r", "plugins", "-r", "mobile-spec", "-r", platform, "-r", "js"], workdir='build', haltOnFailure=True, description='COHO Clone'),
+            ShellCommand(command=["./cordova-coho/coho", "repo-update", "-r", "plugins", "-r", "mobile-spec", "-r", platform, "-r", "js"], workdir='build', haltOnFailure=True, description='COHO Update'),
+            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=PLUGIN", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=False, description='Checkout Plugins'),
+            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=PLATFORM", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=False, description='Checkout Platform'),
+            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=JS", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=False, description='Checkout JS')
+        ]
+
+    def create_app_steps(self):
+        return [
+            ShellCommand(command=["node", "cordova-cli/bin/cordova", "create", "mobilespec", "org.apache.mobilespec", "mobilespec"], workdir='build', haltOnFailure=True, description='CLI Create'),
+            ShellCommand(command=["node", "medic/writejson.js", "--branch=master"], workdir='build', haltOnFailure=True, description='Write json')
+        ]
+
+    def platform_add_steps(self):
+        return [ShellCommand(command=["../cordova-cli/bin/cordova", "platform", "add", self.platform], workdir='build/mobilespec', haltOnFailure=True, description='Platform Add')]
+
+    def build_cordovajs_steps(self):
+        return [
+            ShellCommand(command=["npm", "install"], workdir='build/cordova-js', description='Install Grunt'),
+            ShellCommand(command=["grunt"], workdir='build/cordova-js', description='Grunt')
+        ]
+
+    def prepare_mobilespec_steps(self):
+        return [
+            ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../cordova-mobile-spec/dependencies-plugin", "--searchpath", ".."], workdir='build/mobilespec', haltOnFailure=True, description='Plugin add'),
+            ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../medic/cordova-plugin-medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin add'),
+            ShellCommand(command=["rm", "-rf", "mobilespec/www"], workdir='build', haltOnFailure=False, description='Remove www'),
+            ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../cordova-mobile-spec/www','www','dir')"], workdir='build/mobilespec', haltOnFailure=True, description='Link www'),
+            # added to handle the moved config.xml (up one directory)
+            ShellCommand(command=["cp", "cordova-mobile-spec/config.xml", "mobilespec/config.xml"], workdir='build', haltOnFailure=False, description='Copy config'),
+            ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config'),
+            ShellCommand(command=["node", "../cordova-cli/bin/cordova", "prepare"], workdir='build/mobilespec', haltOnFailure=True, description='CLI Prepare')
+        ]
+
+    def copy_cordovajs_steps(self):
+        return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova." + self.platform + ".js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
+
+    def deploy_steps(self):
+        return [ShellCommand(command=["node", "medic/build_" + self.platform + ".js"], workdir='build', timeout=build_timeout, description='Deploy', name='Deploy')]
+
+    def build_platform_step(self):
+        return [ShellCommand(command=["../cordova-cli/bin/cordova", "build", self.platform], workdir='build/mobilespec', timeout=build_timeout, description='Build', name='Build')]
+
+    def get_all_steps(self):
+        steps = []
+        steps.extend(self.init_workspace_steps())
+        steps.extend(self.repos_clone_steps())
+        steps.extend(cli_steps)
+        steps.extend(self.create_app_steps())
+        steps.extend(self.platform_add_steps())
+        steps.extend(self.build_cordovajs_steps())
+        steps.extend(self.prepare_mobilespec_steps())
+        steps.extend(self.copy_cordovajs_steps())
+        steps.extend(self.deploy_steps())
+        return steps
+
+    def get_build_steps(self):
+        steps = []
+        steps.extend(self.init_workspace_steps())
+        steps.extend(self.repos_clone_steps())
+        steps.extend(cli_steps)
+        steps.extend(self.create_app_steps())
+        steps.extend(self.platform_add_steps())
+        steps.extend(self.build_platform_step())
+        return steps
+
+
+class PlatformTest_iOS(PlatformTestBase):
+    def __init__(self):
+        super(PlatformTest_iOS, self).__init__('ios')
+
+
+class PlatformTest_Android(PlatformTestBase):
+    def __init__(self):
+        super(PlatformTest_Android, self).__init__('android')
+
+
+class PlatformTest_WP8(PlatformTestBase):
+
+    def __init__(self):
+        super(PlatformTest_WP8, self).__init__('wp8')
+    # override cordova.js copy step since grunt builds it as cordova.windowsphone.js, not cordova.wp8.js
+
+    def copy_cordovajs_steps(self):
+        return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova.windowsphone.js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
+
+    def repos_clone_steps(self):
+        steps = super(PlatformTest_WP8, self).repos_clone_steps()
+        # pach cordova-wp8 template to prevent app to lock the screen. In other case we won't be able to re-install the app next time.
+        steps.extend([ShellCommand(command=["node", "medic\src\utils\patch_wp8_template.js"], workdir='build', haltOnFailure=True, description='Patch WP8 template')])
+        return steps
+
+
+class PlatformTest_Windows8(PlatformTestBase):
+
+    def __init__(self):
+        super(PlatformTest_Windows8, self).__init__('windows8')
+
+    def copy_cordovajs_steps(self):
+        copy_cmd = "var fs=require('fs');"
+        copy_cmd += "var platform=fs.existsSync('mobilespec/platforms/windows8')?'windows8':'windows';"
+        copy_cmd += "fs.createReadStream('cordova-js/pkg/cordova.'+platform+'.js').pipe(fs.createWriteStream('mobilespec/platforms/'+platform+'/platform_www/cordova.js'));"
+        return [ShellCommand(command=["node", "-e", copy_cmd], workdir='build', haltOnFailure=False, description='Copy JS to Windows platform')]
+
+    def deploy_steps(self):
+        return [
+            ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--store80"],
+                         workdir='build', timeout=build_timeout,
+                         description='Deploy Store80 project',
+                         name='Deploy Store80 project'),
+            ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--store"],
+                         workdir='build', timeout=build_timeout,
+                         description='Deploy Store project',
+                         name='Deploy Store project'),
+            ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--phone"],
+                         workdir='build', timeout=build_timeout,
+                         description='Deploy Phone project',
+                         name='Deploy Phone project'),
+        ]
+
+from buildbot.config import BuilderConfig
+from buildbot.process.factory import BuildFactory
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.transfer import FileDownload
+# from buildbot.config import BuilderConfig
+
+class PlatformTest_Blackberry(PlatformTestBase):
+
+    def __init__(self):
+        super(PlatformTest_Blackberry, self).__init__('blackberry10')
+
+    def prepare_mobilespec_steps(self):
+        steps = super(PlatformTest_Blackberry, self).prepare_mobilespec_steps()
+        steps.extend([ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "rm", "org.apache.cordova.core.medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin rm')])
+        return steps
+
+    def deploy_steps(self):
+        steps = [ShellCommand(command=["cp", "platforms/blackberry10/www/config.xml", "./config.xml"], workdir='build/mobilespec', haltOnFailure=True, description='Plugin add')]
+        steps.extend(super(PlatformTest_Blackberry, self).deploy_steps())
+        return steps
+
+if(build_ios):
+    factory_IOS_master = BuildFactory()
+    factory_IOS_master.addSteps(PlatformTest_iOS().get_all_steps())
+    c['builders'].append(BuilderConfig(name="IOS", slavenames=["cordova-ios-slave"], factory=factory_IOS_master))
+
+if(build_android):
+    factory_Android_master = BuildFactory()
+    factory_Android_master.addSteps(PlatformTest_Android().get_all_steps())
+    c['builders'].append(BuilderConfig(name="Android", slavenames=["cordova-android-slave"], factory=factory_Android_master))
+
+    factory_Android_build_only = BuildFactory()
+    factory_Android_build_only.addSteps(PlatformTest_Android().get_build_steps())
+    c['builders'].append(BuilderConfig(name="AndroidWin", slavenames=["cordova-windows-slave"], factory=factory_Android_build_only))
+
+if(build_wp8):
+    factory_wp8 = BuildFactory()
+    factory_wp8.addSteps(PlatformTest_WP8().get_all_steps())
+    c['builders'].append(BuilderConfig(name="WP8", slavenames=["cordova-windows-slave"], factory=factory_wp8))
+    c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_wp8))
+
+if(build_windows8):
+    factory_windows8 = BuildFactory()
+    factory_windows8.addSteps(PlatformTest_Windows8().get_all_steps())
+    c['builders'].append(BuilderConfig(name="Windows", slavenames=["cordova-windows-slave"], factory=factory_windows8))
+    c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_windows8))
+
+if(build_blackberry):
+    factory_BlackBerry = BuildFactory()
+    factory_BlackBerry.addSteps(PlatformTest_Blackberry().get_all_steps())
+    c['builders'].append(BuilderConfig(name="BlackBerry", slavenames=["cordova-blackberry-slave"], factory=factory_BlackBerry))
+
+import platform
+
+# TODO. temporary disable separate cli and plugman tests on Windows
+# if not platform.system() == "Windows" :
+factory_cli = BuildFactory()
+factory_cli.addStep(ShellCommand(command=["rm","-rf","cordova-*"],workdir='build',haltOnFailure=False,description='Cordova Clean'))
+factory_cli.addSteps(cli_steps)
+c['builders'].append(BuilderConfig(name="Tools_CLI",slavenames=["cordova-common-slave"],factory=factory_cli))
+
+#    factory_plugman = BuildFactory()
+#    factory_plugman.addSteps(plugman_steps)
+#    c['builders'].append(BuilderConfig(name="Tools_Plugman",slavenames=["cordova-common-slave"],factory=factory_plugman))
+
+if build_chrome:
+    factory_chrome_desktop = BuildFactory()
+    factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
+    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
+    # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
+    factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
+    factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean Chromespec', descriptionDone='Clean Chromespec'))
+    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch Chromespec', descriptionDone='Fetch Chromespec'))
+    factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
+    factory_chrome_desktop.addStep(ShellCommand(command=["node", "medic/runner/testrunner.js", "--cmd=medic/runner/runchrome.sh", "--path=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests", "--args=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='Run Chrome', descriptionDone='Run Chrome'))
+    c['builders'].append(BuilderConfig(name="ZChrome_Desktop", slavenames=["cordova-common-slave"], factory=factory_chrome_desktop))
+
+    factory_chrome_mobile = BuildFactory()
+    factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
+    # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
+    factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
+
+    factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean cca', descriptionDone='Clean cca'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "--recurse-submodules", repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch cca', descriptionDone='Fetch cca'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/mobile-chrome-apps', haltOnFailure=True, description='Install cca', descriptionDone='Install cca'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "ccatest"], workdir='build', haltOnFailure=True, description='Clean ccatest', descriptionDone='Clean ccatest'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["mobile-chrome-apps/src/cca.js", "create", "ccatest", "--copy-from", "mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='cca create', descriptionDone='cca create'))
+
+    factory_chrome_mobile.addStep(ShellCommand(command=["node", "../medic/runner/testrunner.js", "--ip=192.168.1.122", "--port=6800", "--cmd=../medic/runner/runcca.sh", "--path=www", "--args=android"], workdir='build/ccatest', timeout=300, haltOnFailure=True, description='Run Mobile', descriptionDone='Run Mobile'))
+    c['builders'].append(BuilderConfig(name="ZChrome_Mobile", slavenames=["cordova-android-slave"], factory=factory_chrome_mobile))
+
+#mail status
+
+# Store these here for now, not sure if we'll use them.
+
+# mail_to = []
+# for mt in json_config['mail']['to']:
+#     mail_to.append(str(mt))
+
+# mail_from = str(json_config['mail']['from'])
+# mail_pw = str(json_config['mail']['password'])
+# mail_serverURL = str(json_config['mail']['serverURL'])
+
+#irc status
+
+from buildbot.status import words
+c['status'].append(words.IRC(host="irc.freenode.net", nick="cordova-bot",
+                              allowForce=True,
+                              channels=["#asftest"],
+			      notify_events={
+				'successToFailure': 1,
+				'failureToSuccess': 1,
+				},
+                              categories=["cordova-weinre"]))
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/784c8844/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index 40dee09..00ab57a 100644
--- a/master.cfg
+++ b/master.cfg
@@ -2,77 +2,38 @@
 # -*- python -*-
 # ex: set syntax=python:
 
-# This is the buildmaster config file for cordova. It must be installed as
-# 'master.cfg' in your buildmaster's base directory.
+# This is a sample buildmaster config file. It must be installed as
+# 'master.cfg' in your buildmaster's base directory (although the filename
+# can be changed with the --basedir option to 'mktap buildbot master').
+
+# It has one job: define a dictionary named BuildmasterConfig. This
+# dictionary has a variety of keys to control different aspects of the
+# buildmaster. They are documented in docs/config.xhtml .
 
-from twisted.python import log
 
 # This is the dictionary that the buildmaster pays attention to. We also use
 # a shorter alias to save typing.
-c = BuildmasterConfig = {}
-# from buildbot import manhole
-
-# Manhole permits to ssh into the buildbot master process and examine the global variables.
-# Temporary disable it since there known issues with manhole on Windows platform so buildbot can't launch master
-# c['manhole']=manhole.PasswordManhole("tcp:1234:interface=127.0.0.1","admin","passwd")
-
-# Detect system we are running
-import platform
-log.msg("Platform is %s" % (platform.system(),))
 
-# the 'change_source' setting tells the buildmaster how it should find out
-# about source code changes.
-from buildbot.changes.gitpoller import GitPoller
-c['change_source'] = []
+# Absolute or relative path to buildbot per-project configureations.
+# For local Buildbot installation it is convenient to use the same directory
+# for main master.cfg and projects .conf files
+FP = "./"
 
-import json
-with open("../config.json") as f:
-    json_config = json.load(f)
-
-with open("../repos.json") as f:
-    json_repos = json.load(f)
-
-platform_list = json_config['app']['platforms']
-branch_release = str(json_config['app']['release'])
-build_timeout = json_config['app']['timeout']
-
-build_android = ('android' in platform_list)
-build_chrome = ('chrome' in platform_list)
-build_ios = ('ios' in platform_list)
-build_wp8 = ('wp8' in platform_list)
-build_windows = ('windows' in platform_list)
-build_blackberry = ('blackberry' in platform_list)
-projectbranches = ['master', branch_release]
-polltime = 300
-stabletime = 30
-# GitPoller on Windows fails if gitbin location is not provided.
-# Set git location if running medic master on Windows
-git_bin = ""  #"c:\Program Files (x86)\Git\cmd\git.exe"
-mail_to = []
-for mt in json_config['mail']['to']:
-    mail_to.append(str(mt))
+c = BuildmasterConfig = {}
 
-mail_from = str(json_config['mail']['from'])
-mail_pw = str(json_config['mail']['password'])
-mail_serverURL = str(json_config['mail']['serverURL'])
+####### BUILDSLAVES
 
+# import the passwds
 
-def getBranches(tags):
-    result = []
-    for b in tags:
-        if(b == 'RELEASE'):
-            result.append(branch_release)
-        else:
-            result.append(str(b))
-    return result
+# import private
+# reload(private)
 
+# c['db_url'] = private.mysqlConnection
 
-####### BUILDSLAVES
-# The 'slaves' list defines the set of recognized buildslaves. Each element is
-# a BuildSlave object, specifying a unique slave name and password.  The same
-# slave name and password must be configured on the slave.
+# the 'slaves' list defines the set of allowable buildslaves. Each element is
+# a tuple of bot-name and bot-password. These correspond to values given to
+# the buildslave's mktap invocation.
 from buildbot.buildslave import BuildSlave
-from buildbot.changes import pb
 
 c['slaves'] = [
     BuildSlave("cordova-ios-slave", "pass", max_builds=1),
@@ -83,306 +44,158 @@ c['slaves'] = [
     BuildSlave("cordova-common-slave", "pass", max_builds=3)
 ]
 
-# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
-# This must match the value configured into the buildslaves (with their
-# --master option)
-c['slavePortnum'] = 9889
+# to limit to two concurrent builds on a slave, use
+#  c['slaves'] = [BuildSlave("bot1name", "bot1passwd", max_builds=2)]
 
-repos = {}
-branches = {}
 
+# 'slavePortnum' defines the TCP port to listen on. This must match the value
+# configured into the buildslaves (with their --master option)
 
-# periodically fetches from a remote git repository and processes any changes
-def listen_for_source_change(repo_url, project, branches):
-    if (git_bin == ""):
-        c['change_source'].append(
-            GitPoller(repo_url, project=project, branches=branches, pollinterval=polltime))
-    else:
-        c['change_source'].append(
-            GitPoller(repo_url, gitbin=git_bin, project=project, branches=branches, pollinterval=polltime))
+c['slavePortnum'] = 9989
 
-for jrepo in json_repos['repos']:
-    title = str(jrepo["title"])
-    repo_url = str(jrepo['repo'])
-    title = str(jrepo["title"])
-    repo_url = str(jrepo['repo'])
-    repos[title] = repo_url
-    branches[title] = str(jrepo['current'])
-
-    listen_for_source_change(repo_url, str(jrepo['category']), getBranches([jrepo['release'], jrepo['current']]))
-
-c['change_source'].append(pb.PBChangeSource(port=9999, user='Cordova', passwd='Cordova'))
+####### CHANGESOURCES
 
+# the 'change_source' setting tells the buildmaster how it should find out
+# about source code changes. Any class which implements IChangeSource can be
+# put here: there are several in buildbot/changes/*.py to choose from.
+
+from buildbot.changes.pb import PBChangeSource
+
+# c['change_source'] = PBChangeSource(user=private.pbcsUser,
+#                                     passwd=private.pbcsPwd)
+c['change_source'] = PBChangeSource(port=9999,
+                                    user='Cordova',
+                                    passwd='Cordova')
+
+# from buildbot.changes.svnpoller import SVNPoller)
+
+# For example, if you had CVSToys installed on your repository, and your
+# CVSROOT/freshcfg file had an entry like this:
+#pb = ConfigurationSet([
+#    (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)),
+#    ])
+
+# then you could use the following buildmaster Change Source to subscribe to
+# the FreshCVS daemon and be notified on every commit:
+#
+#from buildbot.changes.freshcvs import FreshCVSSource
+#fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar")
+#c['change_source'] = fc_source
+
+# or, use a PBChangeSource, and then have your repository's commit script run
+# 'buildbot sendchange', or use contrib/svn_buildbot.py, or
+# contrib/arch_buildbot.py :
+#
+#from buildbot.changes.pb import PBChangeSource
+#c['change_source'] = PBChangeSource()
+
+####### GLOBAL EXCLUDES LIST - DO NOT TRIGGER BUILDS ON THESE FILES
+
+import re
+masterExcludes = ["STATUS" , "README" , "CHANGES" , "INSTALL"]
+
+def isGlobalImportant(change):
+    if not masterExcludes:
+        return True
+
+    for file in change.files:
+        triggerBuild = True
+        for pattern in masterExcludes:
+            match = re.match(pattern, file)
+            if match:
+                triggerBuild = False
+                break
+        if triggerBuild:
+            return True
+
+## NOTES
+#
+# add 'fileIsImportant = isGlobalImportant' to any project scheduler(s)
+# that you want to apply this global list to.
+#
+# Projects can individually extend this global default :
+#
+# Place something like this in the projects/$project.conf file:
+#
+# $projectExcludes = [masterExcludes , "exclude.me" , "andme.too" , "etc..."]
+#
+# def isProjectimportant
+#     if not $projectExcludes:
+#        return True
+#
+#   for file in change.files:
+#        triggerBuild = True
+#        for pattern in $projectExcludes:
+#            match = re.match(pattern, file)
+#            if match:
+#                triggerBuild = False
+#                break
+#        if triggerBuild:
+#            return True
+#
+##
+# Then add 'fileisImportant = is$Projectimportant' to the scheduler.
+# (replace $project in all above with actual project name!)
+##
 
 ####### SCHEDULERS
 
-# Configure the Schedulers, which decide how to react to incoming changes.
-
-from buildbot.schedulers.basic import SingleBranchScheduler
-from buildbot.schedulers.forcesched import ForceScheduler
+## configure the Schedulers
+from buildbot.scheduler import AnyBranchScheduler, Periodic, Scheduler, Nightly, Dependent
+from buildbot.schedulers.basic  import SingleBranchScheduler
 from buildbot.changes import filter
 
-builders = []
-force_builders = []
 c['schedulers'] = []
 
-for test in json_repos['tests']:
-    if test["platform"] in platform_list:
-        if type(test["builder"]) == list:
-            builders = [str(b) for b in test["builder"]]
-        else:
-            builders = [str(test["builder"])]
-
-        force_builders.extend(builders)
-
-        c['schedulers'].append(SingleBranchScheduler(
-                               name=str(test["title"]),
-                               change_filter=filter.ChangeFilter(branch=test["branch"], project=test["categories"]),
-                               treeStableTimer=stabletime,
-                               builderNames=builders))
-
-c['schedulers'].append(ForceScheduler(name="force", builderNames=force_builders))
-
+# append project schedulers in projects/$project.conf
 
 ####### BUILDERS
 
-# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
-# what steps, and which slaves can execute them.  Note that any particular build will
-# only take place on one slave.
-
-from buildbot.process.factory import BuildFactory
-from buildbot.steps.shell import ShellCommand
-from buildbot.steps.transfer import FileDownload
-from buildbot.config import BuilderConfig
-
-cli_steps = [
-    ShellCommand(command=["git", "clone", "-b", branches['CLI'], repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Get CLI'),
-    ShellCommand(command=["mkdir", "node_modules"], workdir='build/cordova-cli', haltOnFailure=True, description='Prepare cordova-lib'),
-    ShellCommand(command=["git", "clone", "-b", branches['CORDOVA-LIB'], repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Update cordova-lib'),
-    ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../../cordova-lib/cordova-lib', 'cordova-lib', 'dir')"], workdir='build/cordova-cli/node_modules', haltOnFailure=False, description='Link cordova-lib'),
-    ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-cli/node_modules/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
-    ShellCommand(command=["rm", "-f", "npm-shrinkwrap.json"], workdir='build/cordova-cli', haltOnFailure=False, description='Remove CLI SW'),
-    ShellCommand(command=["npm", "install"], workdir='build/cordova-cli', haltOnFailure=True, description='Install CLI'),
-    ShellCommand(command=["npm", "test"], workdir='build/cordova-cli', haltOnFailure=True, description='Test CLI'),
-]
-
-plugman_steps = [
-    ShellCommand(command=["git", "clone", repos['PLUGMAN'], "cordova-plugman"], workdir='build', haltOnFailure=True, description='Get Plugman'),
-    ShellCommand(command=["npm", "install"], workdir='build/cordova-plugman', haltOnFailure=True, description='Install Plugman'),
-    ShellCommand(command=["npm", "test"], workdir='build/cordova-plugman', haltOnFailure=True, description='Test Plugman'),
-]
+# the 'builders' list defines the Builders. Each one is configured with a
+# dictionary, using the following keys:
+#  name (required): the name used to describe this bilder
+#  slavename (required): which slave to use, must appear in c['bots']
+#  builddir (required): which subdirectory to run the builder in
+#  factory (required): a BuildFactory to define how the build is run
+#  periodicBuildTime (optional): if set, force a build every N seconds
+
+# buildbot/process/factory.py provides several BuildFactory classes you can
+# start with, which implement build processes for common targets (GNU
+# autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the
+# base class, and is configured with a series of BuildSteps. When the build
+# is run, the appropriate buildslave is told to execute each Step in turn.
+
+# the first BuildStep is typically responsible for obtaining a copy of the
+# sources. There are source-obtaining Steps in buildbot/steps/source.py for
+# CVS, SVN, and others.
+
+# cvsroot = ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/buildbot"
+# cvsmodule = "buildbot"
+
+from buildbot.process.properties import Interpolate
+from buildbot.process import factory
+from buildbot.steps.source import Git
+from buildbot.steps.source.git import Git
+from buildbot.steps.source import SVN
+from buildbot.steps.source.svn import SVN
+from buildbot.steps.shell import Compile
+from buildbot.steps.python_twisted import Trial
+
+# append project builders in projects/$project.conf
 
 c['builders'] = []
 
 
-class PlatformTestBase(object):
-    def __init__(self, platform):
-        self.platform = platform
-
-    def init_workspace_steps(self):
-        return [
-            ShellCommand(command=["rm", "-rf", "~/.cordova/" + self.platform], workdir='build', haltOnFailure=False, description='Remove cache'),
-            ShellCommand(command=["rm", "-rf", "*"], workdir='build', haltOnFailure=False, description='Clean workdir'),
-            ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic'),
-            # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
-            ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic'),
-            FileDownload(mastersrc="../config.json", slavedest="medic/config.json", haltOnFailure=True),
-            FileDownload(mastersrc="../repos.json", slavedest="medic/repos.json", haltOnFailure=True),
-            ShellCommand(command=["git", "clone", repos['COHO']], workdir='build', haltOnFailure=True, description='Get COHO'),
-            ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-coho', haltOnFailure=True, description='Install COHO'),
-        ]
-
-    def repos_clone_steps(self):
-        platform = self.platform
-        # required by coho tools to correctly resolve repo location
-        if platform == "blackberry10":
-            platform = "blackberry"
-        return [
-            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=MSPEC", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=True, description='Clone Mobilespec'),
-            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=PLUGIN", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=True, description='Clone Plugins'),
-            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=" + platform, "--releasebranch=" + branch_release], workdir='build', haltOnFailure=True, description='Clone Platform'),
-            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=JS", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=True, description='Clone JS')
-        ]
-    
-    def build_cordovajs_steps(self):
-        return [
-            ShellCommand(command=["npm", "install"], workdir='build/cordova-js', description='Install Grunt'),
-            ShellCommand(command=["node", "../medic/build_js.js", self.platform], workdir='build/cordova-js', description='Grunt')
-        ]
-
-    def prepare_mobilespec_steps(self):
-        platform = self.platform
-        # required by coho tools to correctly resolve repo location
-        if platform == "blackberry10":
-            platform = "blackberry"
-        return [
-            ShellCommand(command=["npm", "install"], workdir='build/cordova-mobile-spec/createmobilespec', haltOnFailure=True, description='Install createmobilespec'),
-            ShellCommand(command=["cordova-coho/coho", "npm-link"], workdir='build', haltOnFailure=True, description='COHO npm-link'),
-            ShellCommand(command=["cordova-mobile-spec/createmobilespec/createmobilespec", "--" + platform, "mobilespec"], workdir='build', haltOnFailure=True, description='Run createmobilespec'),
-            ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../medic/cordova-plugin-medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin add'),
-            ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config')
-        ]
-
-    def copy_cordovajs_steps(self):
-        return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova." + self.platform + ".js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
-
-    def deploy_steps(self):
-        return [ShellCommand(command=["node", "medic/build_" + self.platform + ".js"], workdir='build', timeout=build_timeout, description='Deploy', name='Deploy')]
-
-    def build_platform_step(self):
-        return [ShellCommand(command=["../cordova-cli/bin/cordova", "build", self.platform], workdir='build/mobilespec', timeout=build_timeout, description='Build', name='Build')]
-
-    def get_all_steps(self):
-        steps = []
-        steps.extend(self.init_workspace_steps())
-        steps.extend(self.repos_clone_steps())
-        steps.extend(cli_steps)
-        steps.extend(plugman_steps)
-        steps.extend(self.build_cordovajs_steps())
-        steps.extend(self.prepare_mobilespec_steps())
-        steps.extend(self.copy_cordovajs_steps())
-        steps.extend(self.deploy_steps())
-        return steps
-
-class PlatformTest_iOS(PlatformTestBase):
-    def __init__(self):
-        super(PlatformTest_iOS, self).__init__('ios')
-
-
-class PlatformTest_Android(PlatformTestBase):
-    def __init__(self):
-        super(PlatformTest_Android, self).__init__('android')
-
-
-class PlatformTest_WP8(PlatformTestBase):
-
-    def __init__(self):
-        super(PlatformTest_WP8, self).__init__('wp8')
-    # override cordova.js copy step since grunt builds it as cordova.windowsphone.js, not cordova.wp8.js
-
-    def copy_cordovajs_steps(self):
-        return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova.windowsphone.js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
-
-    def repos_clone_steps(self):
-        steps = super(PlatformTest_WP8, self).repos_clone_steps()
-        # pach cordova-wp8 template to prevent app to lock the screen. In other case we won't be able to re-install the app next time.
-        steps.extend([ShellCommand(command=["node", "medic\src\utils\patch_wp8_template.js"], workdir='build', haltOnFailure=True, description='Patch WP8 template')])
-        return steps
-
-
-class PlatformTest_Windows(PlatformTestBase):
-
-    def __init__(self):
-        super(PlatformTest_Windows, self).__init__('windows')
-
-    def deploy_steps(self):
-        return [
-            ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--store80"],
-                         workdir='build', timeout=build_timeout,
-                         description='Deploy Store80 project',
-                         name='Deploy Store80 project'),
-            ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--store"],
-                         workdir='build', timeout=build_timeout,
-                         description='Deploy Store project',
-                         name='Deploy Store project'),
-            ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--phone"],
-                         workdir='build', timeout=build_timeout,
-                         description='Deploy Phone project',
-                         name='Deploy Phone project'),
-        ]
-
-
-class PlatformTest_Blackberry(PlatformTestBase):
-
-    def __init__(self):
-        super(PlatformTest_Blackberry, self).__init__('blackberry10')
-
-    def prepare_mobilespec_steps(self):
-        steps = super(PlatformTest_Blackberry, self).prepare_mobilespec_steps()
-        steps.extend([ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "rm", "org.apache.cordova.core.medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin rm')])
-        return steps
-
-    def deploy_steps(self):
-        steps = [ShellCommand(command=["cp", "platforms/blackberry10/www/config.xml", "./config.xml"], workdir='build/mobilespec', haltOnFailure=True, description='Plugin add')]
-        steps.extend(super(PlatformTest_Blackberry, self).deploy_steps())
-        return steps
-
-if(build_ios):
-    factory_IOS_master = BuildFactory()
-    factory_IOS_master.addSteps(PlatformTest_iOS().get_all_steps())
-    c['builders'].append(BuilderConfig(name="IOS", slavenames=["cordova-ios-slave"], factory=factory_IOS_master))
-
-if(build_android):
-    factory_Android_master = BuildFactory()
-    factory_Android_master.addSteps(PlatformTest_Android().get_all_steps())
-    c['builders'].append(BuilderConfig(name="Android", slavenames=["cordova-android-slave"], factory=factory_Android_master))
-
-    factory_Android_build_only = BuildFactory()
-    factory_Android_build_only.addSteps(PlatformTest_Android().get_all_steps())
-    c['builders'].append(BuilderConfig(name="AndroidWin", slavenames=["cordova-windows-slave"], factory=factory_Android_build_only))
-
-if(build_wp8):
-    factory_wp8 = BuildFactory()
-    factory_wp8.addSteps(PlatformTest_WP8().get_all_steps())
-    c['builders'].append(BuilderConfig(name="WP8", slavenames=["cordova-windows-slave"], factory=factory_wp8))
-    c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_wp8))
-
-if(build_windows):
-    factory_windows = BuildFactory()
-    factory_windows.addSteps(PlatformTest_Windows().get_all_steps())
-    c['builders'].append(BuilderConfig(name="Windows", slavenames=["cordova-windows-slave"], factory=factory_windows))
-    c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_windows))
-
-if(build_blackberry):
-    factory_BlackBerry = BuildFactory()
-    factory_BlackBerry.addSteps(PlatformTest_Blackberry().get_all_steps())
-    c['builders'].append(BuilderConfig(name="BlackBerry", slavenames=["cordova-blackberry-slave"], factory=factory_BlackBerry))
-
-# TODO. temporary disable separate cli and plugman tests on Windows
-if not platform.system() == "Windows" :
-    factory_cli = BuildFactory()
-    factory_cli.addStep(ShellCommand(command=["rm","-rf","cordova-*"],workdir='build',haltOnFailure=False,description='Cordova Clean'))
-    factory_cli.addSteps(cli_steps)
-    c['builders'].append(BuilderConfig(name="Tools_CLI",slavenames=["cordova-common-slave"],factory=factory_cli))
-
-#    factory_plugman = BuildFactory()
-#    factory_plugman.addSteps(plugman_steps)
-#    c['builders'].append(BuilderConfig(name="Tools_Plugman",slavenames=["cordova-common-slave"],factory=factory_plugman))
-
-if build_chrome:
-    factory_chrome_desktop = BuildFactory()
-    factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
-    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
-    # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
-    factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
-    factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean Chromespec', descriptionDone='Clean Chromespec'))
-    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch Chromespec', descriptionDone='Fetch Chromespec'))
-    factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
-    factory_chrome_desktop.addStep(ShellCommand(command=["node", "medic/runner/testrunner.js", "--cmd=medic/runner/runchrome.sh", "--path=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests", "--args=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='Run Chrome', descriptionDone='Run Chrome'))
-    c['builders'].append(BuilderConfig(name="ZChrome_Desktop", slavenames=["cordova-common-slave"], factory=factory_chrome_desktop))
-
-    factory_chrome_mobile = BuildFactory()
-    factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
-    # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
-    factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
-
-    factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean cca', descriptionDone='Clean cca'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "--recurse-submodules", repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch cca', descriptionDone='Fetch cca'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/mobile-chrome-apps', haltOnFailure=True, description='Install cca', descriptionDone='Install cca'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "ccatest"], workdir='build', haltOnFailure=True, description='Clean ccatest', descriptionDone='Clean ccatest'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["mobile-chrome-apps/src/cca.js", "create", "ccatest", "--copy-from", "mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='cca create', descriptionDone='cca create'))
-
-    factory_chrome_mobile.addStep(ShellCommand(command=["node", "../medic/runner/testrunner.js", "--ip=192.168.1.122", "--port=6800", "--cmd=../medic/runner/runcca.sh", "--path=www", "--args=android"], workdir='build/ccatest', timeout=300, haltOnFailure=True, description='Run Mobile', descriptionDone='Run Mobile'))
-    c['builders'].append(BuilderConfig(name="ZChrome_Mobile", slavenames=["cordova-android-slave"], factory=factory_chrome_mobile))
-
-
 ####### STATUS TARGETS
+
 # 'status' is a list of Status Targets. The results of each build will be
 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
 # including web pages, email senders, and IRC bots.
 
+import json
+with open(FP + "config.json") as f:
+   json_config = json.load(f)
+
 c['status'] = []
 
 from buildbot.status import html
@@ -400,6 +213,13 @@ authz_cfg = authz.Authz(auth=auth.BasicAuth([("Cordova", "Cordova")]),
                         cancelPendingBuild=False,
                         )
 
+mail_from = str(json_config['mail']['from'])
+mail_to = []
+for mt in json_config['mail']['to']:
+    mail_to.append(str(mt))
+
+mail_pw = str(json_config['mail']['password'])
+
 mn1 = MailNotifier(fromaddr=mail_from,
                    sendToInterestedUsers=False,
                    mode=('change',),
@@ -414,27 +234,73 @@ mn1 = MailNotifier(fromaddr=mail_from,
 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
 c['status'].append(mn1)
 
+# Include any global imports here that more than one project needs.
+
+from buildbot.steps.master import MasterShellCommand
+from buildbot.steps.transfer import FileUpload
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.transfer import DirectoryUpload
+from buildbot.steps.shell import ShellCommand, SetProperty
+from buildbot.steps.shell import Configure
+from buildbot.steps.shell import Test
+from buildbot.steps.python import PyFlakes
+from buildbot.process.buildstep import BuildStep
+from buildbot.process.properties import WithProperties
+from buildbot import locks
+
+# import the rat report fileupload class
+
+# from rat_report_upload import rat_report_upload
+
+# Ensure that projects include is below all definition imports.
+
+execfile(FP + "projects.conf", globals(), locals())
+
+# Data Lifetime - how long to keep old build logs and status around.
+
+c['changeHorizon'] = 200
+c['buildHorizon'] = 100
+c['eventHorizon'] = 50
+c['logHorizon'] = 40
+c['buildCacheSize'] = 50 # Not sure about value of this one, should be ok though.
+c['changeCacheSize'] = 10000
+
+
+####### DEBUGGING OPTIONS
+
+# if you set 'debugPassword', then you can connect to the buildmaster with
+# the diagnostic tool in contrib/debugclient.py . From this tool, you can
+# manually force builds and inject changes, which may be useful for testing
+# your buildmaster without actually commiting changes to your repository (or
+# before you have a functioning 'sources' set up). The debug tool uses the
+# same port number as the slaves do: 'slavePortnum'.
+
+#c['debugPassword'] = "debugpassword"
+
+# if you set 'manhole', you can ssh into the buildmaster and get an
+# interactive python shell, which may be useful for debugging buildbot
+# internals. It is probably only useful for buildbot developers. You can also
+# use an authorized_keys file, or plain telnet.
+#from buildbot import manhole
+#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
+#                                       "admin", "password")
+
+
 ####### PROJECT IDENTITY
 
-# the 'title' string will appear at the top of this buildbot
-# installation's html.WebStatus home page (linked to the
-# 'titleURL') and is embedded in the title of the waterfall HTML page.
+# the 'projectName' string will be used to describe the project that this
+# buildbot is working on. For example, it is used as the title of the
+# waterfall HTML page. The 'projectURL' string will be used to provide a link
+# from buildbot HTML pages to your project's home page.
 
 c['title'] = "Cordova Testing"
 c['titleURL'] = "http://cordova.apache.org"
 
 # the 'buildbotURL' string should point to the location where the buildbot's
-# internal web server (usually the html.WebStatus page) is visible. This
+# internal web server (usually the html.Waterfall page) is visible. This
 # typically uses the port number set in the Waterfall 'status' entry, but
 # with an externally-visible host name which the buildbot cannot figure out
 # without some help.
 
+mail_serverURL = str(json_config['mail']['serverURL'])
 c['buildbotURL'] = mail_serverURL
-
-####### DB URL
-
-c['db'] = {
-    # This specifies what database buildbot uses to store its state.  You can leave
-    # this at its default for all but the largest installations.
-    'db_url': "sqlite:///state.sqlite",
-}

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/784c8844/projects.conf
----------------------------------------------------------------------
diff --git a/projects.conf b/projects.conf
new file mode 100644
index 0000000..926bd74
--- /dev/null
+++ b/projects.conf
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+
+def one_file(f, symbols_to_keep = set()):
+    globals_copy = globals().copy()
+    execfile(FP + f, globals_copy, globals_copy)
+    for symbol in symbols_to_keep:
+        if symbol in globals_copy:
+            globals().update({symbol: globals_copy[symbol]})
+
+one_file('cordova.conf')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/7] cordova-medic git commit: Replace comment with module docstring

Posted by an...@apache.org.
Replace comment with module docstring


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/806e218e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/806e218e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/806e218e

Branch: refs/heads/master
Commit: 806e218e83766fe3e9f487a82a2394456312c11b
Parents: 9efe507
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Tue Dec 2 10:39:45 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Dec 2 12:13:00 2014 +0300

----------------------------------------------------------------------
 cordova.conf | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/806e218e/cordova.conf
----------------------------------------------------------------------
diff --git a/cordova.conf b/cordova.conf
index f92293d..4e9f9c1 100644
--- a/cordova.conf
+++ b/cordova.conf
@@ -1,10 +1,8 @@
 #!/usr/bin/python
 
-# This is the config file for the Cordova project.
-# NOTE: The f_cor_1 build runs on ASF slave. Newer builds and schedulers 
-# added on 26th Nov 2014 are for external slaves (currently)
-
-# set some variables
+"""
+This is the config file for the Cordova project.
+"""
 
 import json
 class MedicConfig(object):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[7/7] cordova-medic git commit: INFRA-8588 Split medic Buildbot configuration according to Apache's Buildbot config

Posted by an...@apache.org.
INFRA-8588 Split medic Buildbot configuration according to Apache's Buildbot config

Merge branch 'master_cfg_rework'


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/24b277da
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/24b277da
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/24b277da

Branch: refs/heads/master
Commit: 24b277dac10338fff8fc4537a17d43513b2f020e
Parents: 0ba57fd 291ccef
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Tue Dec 2 17:54:49 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Dec 2 17:57:42 2014 +0300

----------------------------------------------------------------------
 README.md          |  23 +-
 build_js.js        |  14 --
 config.json.sample |   2 +-
 cordova.conf       | 313 +++++++++++++++++++++++++++
 master.cfg         | 560 ++++++++++++++++++------------------------------
 projects.conf      |  10 +
 updateconfig.js    |  20 +-
 writejson.js       |  56 -----
 8 files changed, 559 insertions(+), 439 deletions(-)
----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[6/7] cordova-medic git commit: Fixes some of PEP8 issues

Posted by an...@apache.org.
Fixes some of PEP8 issues


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/291ccef6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/291ccef6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/291ccef6

Branch: refs/heads/master
Commit: 291ccef69e3414ab6132fd8ff9c72b48ce2dc8cc
Parents: 4ee3512
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Tue Dec 2 13:55:10 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Dec 2 13:55:10 2014 +0300

----------------------------------------------------------------------
 cordova.conf | 45 +++++++++++++++++++++++++++++++++------------
 1 file changed, 33 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/291ccef6/cordova.conf
----------------------------------------------------------------------
diff --git a/cordova.conf b/cordova.conf
index fe42497..3789248 100644
--- a/cordova.conf
+++ b/cordova.conf
@@ -58,26 +58,32 @@ from buildbot.schedulers.basic import SingleBranchScheduler
 from buildbot.schedulers.forcesched import ForceScheduler
 from buildbot.changes.filter import ChangeFilter
 
-force_builders = []
+FORCE_BUILDERS = []
 
 c['schedulers'] = []
 
 for test in CONFIG.json_repos['tests']:
 
     test_platform = test["platform"]
-    test_builders = [str(b) for b in test["builder"]] if type(test["builder"]) == list else [str(test["builder"])]
+    test_builders = test["builder"]
+    # convert test_builders to list if necessary
+    if type(test_builders) == unicode:
+        test_builders = [test_builders]
+    # and convert list members to strings (instead of unicode)
+    test_builders = [str(b) for b in test_builders]
 
     if CONFIG.has_platform(test_platform):
 
-        force_builders.extend(test_builders)
-
+        FORCE_BUILDERS.extend(test_builders)
         c['schedulers'].append(SingleBranchScheduler(
-                               name=str(test["title"]),
-                               change_filter=ChangeFilter(branch=test["branch"], project=test["categories"]),
-                               treeStableTimer=CONFIG.stabletime,
-                               builderNames=test_builders))
+            name=test["title"],
+            change_filter=ChangeFilter(
+                branch=test["branch"],
+                project=test["categories"]),
+            treeStableTimer=CONFIG.stabletime,
+            builderNames=test_builders))
 
-c['schedulers'].append(ForceScheduler(name="force", builderNames=force_builders))
+c['schedulers'].append(ForceScheduler(name="force", builderNames=FORCE_BUILDERS))
 
 # new build steps
 
@@ -87,10 +93,12 @@ from buildbot.process.factory import BuildFactory
 from buildbot.steps.transfer import FileDownload
 
 class PlatformTestBase(object):
+    """Base class with common build steps for all platforms"""
     def __init__(self, platform=""):
         self.platform = platform
 
     def init_workspace_steps(self):
+        """Returns a list of initial environment setup steps"""
         return [
             ShellCommand(command=["rm", "-rf", "~/.cordova/" + self.platform], workdir='build', haltOnFailure=False, description='Remove cache'),
             ShellCommand(command=["rm", "-rf", "*"], workdir='build', haltOnFailure=False, description='Clean workdir'),
@@ -104,6 +112,7 @@ class PlatformTestBase(object):
         ]
 
     def repos_clone_steps(self):
+        """Returns a list of steps for cloning necessary repos"""
         platform = self.platform
         # required by coho tools to correctly resolve repo location
         if platform == "blackberry10":
@@ -116,6 +125,7 @@ class PlatformTestBase(object):
         ]
 
     def cli_steps(self):
+        """Returns a list of steps for CLI setup"""
         return [
             ShellCommand(command=["git", "clone", "-b", CONFIG.branches['CLI'], CONFIG.repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Clone CLI'),
             ShellCommand(command=["git", "clone", "--depth", "1", "-b", CONFIG.branches['CORDOVA-LIB'], CONFIG.repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Clone cordova-lib'),
@@ -126,6 +136,10 @@ class PlatformTestBase(object):
         ]
 
     def plugman_steps(self):
+        """
+        Returns a list of steps for CLI setup
+        Should not be used in common case, only for common slave tests
+        """
         return [
             ShellCommand(command=["rm", "-rf", "cordova-*"], workdir='build', haltOnFailure=False, description='Cordova Clean'),
             ShellCommand(command=["git", "clone", CONFIG.repos['PLUGMAN'], "cordova-plugman"], workdir='build', haltOnFailure=True, description='Get Plugman'),
@@ -134,6 +148,7 @@ class PlatformTestBase(object):
         ]
 
     def prepare_mobilespec_steps(self):
+        """Returns a list of steps for mobilespec app setup"""
         platform = self.platform
         # required by coho tools to correctly resolve repo location
         if platform == "blackberry10":
@@ -149,12 +164,18 @@ class PlatformTestBase(object):
         ]
 
     def deploy_steps(self):
+        """
+        Returns a list of steps for deploying
+        mobilespec application to test device
+        """
         return [ShellCommand(command=["node", "medic/build_" + self.platform + ".js"], workdir='build', timeout=CONFIG.build_timeout, description='Deploy', name='Deploy')]
 
     def build_platform_step(self):
+        """Returns a list of steps for building mobilespec application"""
         return [ShellCommand(command=["../cordova-cli/bin/cordova", "build", self.platform], workdir='build/mobilespec', timeout=CONFIG.build_timeout, description='Build', name='Build')]
 
     def get_all_steps(self):
+        """Returns a list of all steps current platform"""
         steps = []
         steps.extend(self.init_workspace_steps())
         steps.extend(self.repos_clone_steps())
@@ -178,13 +199,13 @@ class PlatformTestAndroid(PlatformTestBase):
         super(PlatformTestAndroid, self).__init__('android')
 
 class PlatformTestWP8(PlatformTestBase):
-
     def __init__(self):
         super(PlatformTestWP8, self).__init__('wp8')
 
     def repos_clone_steps(self):
         steps = super(PlatformTestWP8, self).repos_clone_steps()
-        # pach cordova-wp8 template to prevent app to lock the screen. In other case we won't be able to re-install the app next time.
+        # pach cordova-wp8 template to prevent app to lock the screen.
+        # In other case we won't be able to re-install the app next time.
         steps.extend([ShellCommand(command=["node", "medic\src\utils\patch_wp8_template.js"], workdir='build', haltOnFailure=True, description='Patch WP8 template')])
         return steps
 
@@ -273,7 +294,7 @@ if CONFIG.has_platform("chrome"):
 factory_cli = BuildFactory()
 factory_cli.addStep(ShellCommand(command=["rm","-rf","cordova-*"],workdir='build',haltOnFailure=False,description='Cordova Clean'))
 factory_cli.addSteps(PlatformTestBase().cli_steps())
-c['builders'].append(BuilderConfig(name="Tools_CLI",slavenames=["cordova-common-slave"],factory=factory_cli))
+c['builders'].append(BuilderConfig(name="Tools_CLI", slavenames=["cordova-common-slave"], factory=factory_cli))
 
 # factory_plugman = BuildFactory()
 # factory_plugman.addSteps(PlatformTestBase().plugman_steps())


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[3/7] cordova-medic git commit: Multiple improvements

Posted by an...@apache.org.
Multiple improvements

* Put all config-related routines into MedicConfig class()
* Move cli_steps and plugman_steps into PlatformTestBase since they are common for all builders
* introduce get_default_factory() method for PaltformTestBase to simplify creating build factories
* replace windows8 -> windows in platform names


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/9efe5073
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/9efe5073
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/9efe5073

Branch: refs/heads/master
Commit: 9efe50734d77945b2432124df5bba93404c8e843
Parents: 784c884
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Mon Dec 1 18:36:04 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Dec 2 12:13:00 2014 +0300

----------------------------------------------------------------------
 config.json.sample |   2 +-
 cordova.conf       | 310 ++++++++++++++++++++++--------------------------
 2 files changed, 143 insertions(+), 169 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9efe5073/config.json.sample
----------------------------------------------------------------------
diff --git a/config.json.sample b/config.json.sample
index 6048d55..366b506 100644
--- a/config.json.sample
+++ b/config.json.sample
@@ -15,7 +15,7 @@
             "git":"https://git-wip-us.apache.org/repos/asf/cordova-mobile-spec.git"
         },
         "entry":"autotest/pages/all.html",
-        "platforms":"android ios windows8 wp8",
+        "platforms":"android ios windows wp8",
         "release":"master",
         "timeout": 600
     },

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9efe5073/cordova.conf
----------------------------------------------------------------------
diff --git a/cordova.conf b/cordova.conf
index ac176fc..f92293d 100644
--- a/cordova.conf
+++ b/cordova.conf
@@ -4,105 +4,104 @@
 # NOTE: The f_cor_1 build runs on ASF slave. Newer builds and schedulers 
 # added on 26th Nov 2014 are for external slaves (currently)
 
+# set some variables
 
 import json
-with open(FP + "config.json") as f:
-    json_config = json.load(f)
+class MedicConfig(object):
+    """static class that encapsulates all configuration parameters"""
 
-with open(FP + "repos.json") as f:
-    json_repos = json.load(f)
+    def __init__(self):
+        with open(FP + "config.json") as fname:
+            self.json_config = json.load(fname)
 
+        with open(FP + "repos.json") as fname:
+            self.json_repos = json.load(fname)
 
-# set some variables
+        self.platform_list = self.json_config['app']['platforms']
+        self.branch_release = self.json_config['app']['release']
+        self.build_timeout = self.json_config['app']['timeout']
+
+        self.projectbranches = ['master', self.branch_release]
+        self.polltime = 300
+        self.stabletime = 30
+
+        # GitPoller on Windows fails if gitbin location is not provided.
+        # Set git location if running medic master on Windows
+        self.git_bin = ""  #"c:\Program Files (x86)\Git\cmd\git.exe"
+
+        self.repos = {}
+        self.branches = {}
 
-platform_list = json_config['app']['platforms']
-branch_release = str(json_config['app']['release'])
-build_timeout = json_config['app']['timeout']
-
-build_android = ('android' in platform_list)
-build_chrome = ('chrome' in platform_list)
-build_ios = ('ios' in platform_list)
-build_wp8 = ('wp8' in platform_list)
-build_windows8 = ('windows8' in platform_list)
-build_blackberry = ('blackberry' in platform_list)
-projectbranches = ['master', branch_release]
-polltime = 300
-stabletime = 30
-# GitPoller on Windows fails if gitbin location is not provided.
-# Set git location if running medic master on Windows
-git_bin = ""  #"c:\Program Files (x86)\Git\cmd\git.exe"
-
-repos = {}
-branches = {}
-
-for jrepo in json_repos['repos']:
-    title = str(jrepo["title"])
-    repo_url = str(jrepo['repo'])
-    category = str(jrepo['category'])
-    repos[title] = repo_url
-    branches[title] = str(jrepo['current'])
+        self.fetch_repos()
+        self.fetch_branches()
+
+    def has_platform(self, platform_name):
+        """Indicates whether specific platform is need to be built"""
+        return platform_name in self.platform_list
+
+    def fetch_repos(self):
+        """Fetches repos from config.json"""
+        for repo in self.json_repos['repos']:
+            title = str(repo["title"])
+            repo_url = str(repo['repo'])
+            self.repos[title] = repo_url
+
+    def fetch_branches(self):
+        """Fetches branches for each repo from config.json"""
+        for jrepo in self.json_repos['repos']:
+            title = str(jrepo["title"])
+            self.branches[title] = str(jrepo['current'])
+
+CONFIG = MedicConfig()
 
 # schedulers
 
 from buildbot.schedulers.basic import SingleBranchScheduler
 from buildbot.schedulers.forcesched import ForceScheduler
-from buildbot.changes import filter
+from buildbot.changes.filter import ChangeFilter
 
-builders = []
 force_builders = []
+
 c['schedulers'] = []
 
-for test in json_repos['tests']:
-    if test["platform"] in platform_list:
-        if type(test["builder"]) == list:
-            builders = [str(b) for b in test["builder"]]
-        else:
-            builders = [str(test["builder"])]
+for test in CONFIG.json_repos['tests']:
+
+    test_platform = test["platform"]
+    test_builders = [str(b) for b in test["builder"]] if type(test["builder"]) == list else [str(test["builder"])]
 
-        force_builders.extend(builders)
+    if CONFIG.has_platform(test_platform):
+
+        force_builders.extend(test_builders)
 
         c['schedulers'].append(SingleBranchScheduler(
                                name=str(test["title"]),
-                               change_filter=filter.ChangeFilter(branch=test["branch"], project=test["categories"]),
-                               treeStableTimer=stabletime,
-                               builderNames=builders))
+                               change_filter=ChangeFilter(branch=test["branch"], project=test["categories"]),
+                               treeStableTimer=CONFIG.stabletime,
+                               builderNames=test_builders))
 
 c['schedulers'].append(ForceScheduler(name="force", builderNames=force_builders))
 
 # new build steps
 
-cli_steps = [
-    ShellCommand(command=["git", "clone", "-b", branches['CLI'], repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Get CLI'),
-    ShellCommand(command=["mkdir", "node_modules"], workdir='build/cordova-cli', haltOnFailure=True, description='Prepare cordova-lib'),
-    ShellCommand(command=["git", "clone", "-b", branches['CORDOVA-LIB'], repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Update cordova-lib'),
-    ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../../cordova-lib/cordova-lib', 'cordova-lib', 'dir')"], workdir='build/cordova-cli/node_modules', haltOnFailure=False, description='Link cordova-lib'),
-    ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-cli/node_modules/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
-    ShellCommand(command=["rm", "-f", "npm-shrinkwrap.json"], workdir='build/cordova-cli', haltOnFailure=False, description='Remove CLI SW'),
-    ShellCommand(command=["npm", "install"], workdir='build/cordova-cli', haltOnFailure=True, description='Install CLI'),
-    ShellCommand(command=["npm", "test"], workdir='build/cordova-cli', haltOnFailure=True, description='Test CLI'),
-]
-
-plugman_steps = [
-    ShellCommand(command=["rm", "-rf", "cordova-*"], workdir='build', haltOnFailure=False, description='Cordova Clean'),
-    ShellCommand(command=["git", "clone", repos['PLUGMAN'], "cordova-plugman"], workdir='build', haltOnFailure=True, description='Get Plugman'),
-    ShellCommand(command=["npm", "install"], workdir='build/cordova-plugman', haltOnFailure=True, description='Install Plugman'),
-    ShellCommand(command=["npm", "test"], workdir='build/cordova-plugman', haltOnFailure=True, description='Test Plugman'),
-]
+from buildbot.steps.shell import ShellCommand
+from buildbot.config import BuilderConfig
+from buildbot.process.factory import BuildFactory
+from buildbot.steps.transfer import FileDownload
 
 class PlatformTestBase(object):
-    def __init__(self, platform):
+    def __init__(self, platform=""):
         self.platform = platform
 
     def init_workspace_steps(self):
         return [
             ShellCommand(command=["rm", "-rf", "~/.cordova/" + self.platform], workdir='build', haltOnFailure=False, description='Remove cache'),
-            ShellCommand(command=["rm", "-rf", "medic", "mobilespec", "cordova-mobile-spec", "cordova-coho", "cordova-cli", "cordova-lib"], workdir='build', haltOnFailure=False, description='Clean workdir'),
-            ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic'),
+            ShellCommand(command=["rm", "-rf", "*"], workdir='build', haltOnFailure=False, description='Clean workdir'),
+            ShellCommand(command=["git", "clone", "--depth", "1", "-b", CONFIG.branches['TESTMASTER'], CONFIG.repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic'),
             # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
             ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic'),
             FileDownload(mastersrc=FP+"config.json", slavedest="medic/config.json", haltOnFailure=True),
             FileDownload(mastersrc=FP+"repos.json", slavedest="medic/repos.json", haltOnFailure=True),
-            ShellCommand(command=["git", "clone", repos['COHO']], workdir='build', haltOnFailure=True, description='Get COHO'),
+            ShellCommand(command=["git", "clone", "--depth", "1", CONFIG.repos['COHO']], workdir='build', haltOnFailure=True, description='Get COHO'),
             ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-coho', haltOnFailure=True, description='Install COHO'),
         ]
 
@@ -111,106 +110,105 @@ class PlatformTestBase(object):
         # required by coho tools to correctly resolve repo location
         if platform == "blackberry10":
             platform = "blackberry"
-        if platform == "windows8":
-            platform = "windows"
         return [
-            ShellCommand(command=["./cordova-coho/coho", "repo-clone", "-r", "plugins", "-r", "mobile-spec", "-r", platform, "-r", "js"], workdir='build', haltOnFailure=True, description='COHO Clone'),
-            ShellCommand(command=["./cordova-coho/coho", "repo-update", "-r", "plugins", "-r", "mobile-spec", "-r", platform, "-r", "js"], workdir='build', haltOnFailure=True, description='COHO Update'),
-            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=PLUGIN", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=False, description='Checkout Plugins'),
-            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=PLATFORM", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=False, description='Checkout Platform'),
-            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=JS", "--releasebranch=" + branch_release], workdir='build', haltOnFailure=False, description='Checkout JS')
+            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=MSPEC", "--releasebranch=" + CONFIG.branch_release], workdir='build', haltOnFailure=True, description='Clone Mobilespec'),
+            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=PLUGIN", "--releasebranch=" + CONFIG.branch_release], workdir='build', haltOnFailure=True, description='Clone Plugins'),
+            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=" + platform, "--releasebranch=" + CONFIG.branch_release], workdir='build', haltOnFailure=True, description='Clone Platform'),
+            ShellCommand(command=["node", "medic/checkout.js", "--path=medic/repos.json", "--cat=JS", "--releasebranch=" + CONFIG.branch_release], workdir='build', haltOnFailure=True, description='Clone JS'),
         ]
 
-    def create_app_steps(self):
+    def cli_steps(self):
         return [
-            ShellCommand(command=["node", "cordova-cli/bin/cordova", "create", "mobilespec", "org.apache.mobilespec", "mobilespec"], workdir='build', haltOnFailure=True, description='CLI Create'),
-            ShellCommand(command=["node", "medic/writejson.js", "--branch=master"], workdir='build', haltOnFailure=True, description='Write json')
+            ShellCommand(command=["git", "clone", "-b", CONFIG.branches['CLI'], CONFIG.repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Get CLI'),
+            ShellCommand(command=["mkdir", "node_modules"], workdir='build/cordova-cli', haltOnFailure=True, description='Prepare cordova-lib'),
+            ShellCommand(command=["git", "clone", "--depth", "1", "-b", CONFIG.branches['CORDOVA-LIB'], CONFIG.repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Update cordova-lib'),
+            ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../../cordova-lib/cordova-lib', 'cordova-lib', 'dir')"], workdir='build/cordova-cli/node_modules', haltOnFailure=False, description='Link cordova-lib'),
+            ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-cli/node_modules/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
+            ShellCommand(command=["rm", "-f", "npm-shrinkwrap.json"], workdir='build/cordova-cli', haltOnFailure=False, description='Remove CLI SW'),
+            ShellCommand(command=["npm", "install"], workdir='build/cordova-cli', haltOnFailure=True, description='Install CLI'),
+            ShellCommand(command=["npm", "test"], workdir='build/cordova-cli', haltOnFailure=True, description='Test CLI'),
         ]
 
-    def platform_add_steps(self):
-        return [ShellCommand(command=["../cordova-cli/bin/cordova", "platform", "add", self.platform], workdir='build/mobilespec', haltOnFailure=True, description='Platform Add')]
+    def plugman_steps(self):
+        return [
+            ShellCommand(command=["rm", "-rf", "cordova-*"], workdir='build', haltOnFailure=False, description='Cordova Clean'),
+            ShellCommand(command=["git", "clone", CONFIG.repos['PLUGMAN'], "cordova-plugman"], workdir='build', haltOnFailure=True, description='Get Plugman'),
+            ShellCommand(command=["npm", "install"], workdir='build/cordova-plugman', haltOnFailure=True, description='Install Plugman'),
+            ShellCommand(command=["npm", "test"], workdir='build/cordova-plugman', haltOnFailure=True, description='Test Plugman'),
+        ]
 
     def build_cordovajs_steps(self):
         return [
             ShellCommand(command=["npm", "install"], workdir='build/cordova-js', description='Install Grunt'),
-            ShellCommand(command=["grunt"], workdir='build/cordova-js', description='Grunt')
+            ShellCommand(command=["node", "../medic/build_js.js", self.platform], workdir='build/cordova-js', description='Grunt')
         ]
 
     def prepare_mobilespec_steps(self):
+        platform = self.platform
+        # required by coho tools to correctly resolve repo location
+        if platform == "blackberry10":
+            platform = "blackberry"
         return [
-            ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../cordova-mobile-spec/dependencies-plugin", "--searchpath", ".."], workdir='build/mobilespec', haltOnFailure=True, description='Plugin add'),
+            ShellCommand(command=["npm", "install"], workdir='build/cordova-mobile-spec/createmobilespec', haltOnFailure=True, description='Install createmobilespec'),
+            ShellCommand(command=["cordova-coho/coho", "npm-link"], workdir='build', haltOnFailure=True, description='COHO npm-link'),
+            ShellCommand(command=["cordova-mobile-spec/createmobilespec/createmobilespec", "--" + platform, "mobilespec"], workdir='build', haltOnFailure=True, description='Run createmobilespec'),
             ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../medic/cordova-plugin-medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin add'),
-            ShellCommand(command=["rm", "-rf", "mobilespec/www"], workdir='build', haltOnFailure=False, description='Remove www'),
-            ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../cordova-mobile-spec/www','www','dir')"], workdir='build/mobilespec', haltOnFailure=True, description='Link www'),
-            # added to handle the moved config.xml (up one directory)
-            ShellCommand(command=["cp", "cordova-mobile-spec/config.xml", "mobilespec/config.xml"], workdir='build', haltOnFailure=False, description='Copy config'),
-            ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config'),
-            ShellCommand(command=["node", "../cordova-cli/bin/cordova", "prepare"], workdir='build/mobilespec', haltOnFailure=True, description='CLI Prepare')
+            ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config')
         ]
 
     def copy_cordovajs_steps(self):
         return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova." + self.platform + ".js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
 
     def deploy_steps(self):
-        return [ShellCommand(command=["node", "medic/build_" + self.platform + ".js"], workdir='build', timeout=build_timeout, description='Deploy', name='Deploy')]
+        return [ShellCommand(command=["node", "medic/build_" + self.platform + ".js"], workdir='build', timeout=CONFIG.build_timeout, description='Deploy', name='Deploy')]
 
     def build_platform_step(self):
-        return [ShellCommand(command=["../cordova-cli/bin/cordova", "build", self.platform], workdir='build/mobilespec', timeout=build_timeout, description='Build', name='Build')]
+        return [ShellCommand(command=["../cordova-cli/bin/cordova", "build", self.platform], workdir='build/mobilespec', timeout=CONFIG.build_timeout, description='Build', name='Build')]
 
     def get_all_steps(self):
         steps = []
         steps.extend(self.init_workspace_steps())
         steps.extend(self.repos_clone_steps())
-        steps.extend(cli_steps)
-        steps.extend(self.create_app_steps())
-        steps.extend(self.platform_add_steps())
+        steps.extend(self.cli_steps())
         steps.extend(self.build_cordovajs_steps())
         steps.extend(self.prepare_mobilespec_steps())
         steps.extend(self.copy_cordovajs_steps())
         steps.extend(self.deploy_steps())
         return steps
 
-    def get_build_steps(self):
-        steps = []
-        steps.extend(self.init_workspace_steps())
-        steps.extend(self.repos_clone_steps())
-        steps.extend(cli_steps)
-        steps.extend(self.create_app_steps())
-        steps.extend(self.platform_add_steps())
-        steps.extend(self.build_platform_step())
-        return steps
-
+    def get_default_factory(self):
+        """Creates and returns a default factory for platform"""
+        factory = BuildFactory()
+        factory.addSteps(self.get_all_steps())
+        return factory
 
-class PlatformTest_iOS(PlatformTestBase):
+class PlatformTestIOS(PlatformTestBase):
     def __init__(self):
-        super(PlatformTest_iOS, self).__init__('ios')
-
+        super(PlatformTestIOS, self).__init__('ios')
 
-class PlatformTest_Android(PlatformTestBase):
+class PlatformTestAndroid(PlatformTestBase):
     def __init__(self):
-        super(PlatformTest_Android, self).__init__('android')
-
+        super(PlatformTestAndroid, self).__init__('android')
 
-class PlatformTest_WP8(PlatformTestBase):
+class PlatformTestWP8(PlatformTestBase):
 
     def __init__(self):
-        super(PlatformTest_WP8, self).__init__('wp8')
+        super(PlatformTestWP8, self).__init__('wp8')
     # override cordova.js copy step since grunt builds it as cordova.windowsphone.js, not cordova.wp8.js
 
     def copy_cordovajs_steps(self):
         return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova.windowsphone.js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
 
     def repos_clone_steps(self):
-        steps = super(PlatformTest_WP8, self).repos_clone_steps()
+        steps = super(PlatformTestWP8, self).repos_clone_steps()
         # pach cordova-wp8 template to prevent app to lock the screen. In other case we won't be able to re-install the app next time.
         steps.extend([ShellCommand(command=["node", "medic\src\utils\patch_wp8_template.js"], workdir='build', haltOnFailure=True, description='Patch WP8 template')])
         return steps
 
-
-class PlatformTest_Windows8(PlatformTestBase):
+class PlatformTestWindows(PlatformTestBase):
 
     def __init__(self):
-        super(PlatformTest_Windows8, self).__init__('windows8')
+        super(PlatformTestWindows, self).__init__('windows')
 
     def copy_cordovajs_steps(self):
         copy_cmd = "var fs=require('fs');"
@@ -221,105 +219,84 @@ class PlatformTest_Windows8(PlatformTestBase):
     def deploy_steps(self):
         return [
             ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--store80"],
-                         workdir='build', timeout=build_timeout,
+                         workdir='build', timeout=CONFIG.build_timeout,
                          description='Deploy Store80 project',
                          name='Deploy Store80 project'),
             ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--store"],
-                         workdir='build', timeout=build_timeout,
+                         workdir='build', timeout=CONFIG.build_timeout,
                          description='Deploy Store project',
                          name='Deploy Store project'),
             ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--phone"],
-                         workdir='build', timeout=build_timeout,
+                         workdir='build', timeout=CONFIG.build_timeout,
                          description='Deploy Phone project',
                          name='Deploy Phone project'),
         ]
 
-from buildbot.config import BuilderConfig
-from buildbot.process.factory import BuildFactory
-from buildbot.steps.shell import ShellCommand
-from buildbot.steps.transfer import FileDownload
-# from buildbot.config import BuilderConfig
-
-class PlatformTest_Blackberry(PlatformTestBase):
+class PlatformTestBlackberry(PlatformTestBase):
 
     def __init__(self):
-        super(PlatformTest_Blackberry, self).__init__('blackberry10')
+        super(PlatformTestBlackberry, self).__init__('blackberry10')
 
     def prepare_mobilespec_steps(self):
-        steps = super(PlatformTest_Blackberry, self).prepare_mobilespec_steps()
+        steps = super(PlatformTestBlackberry, self).prepare_mobilespec_steps()
         steps.extend([ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "rm", "org.apache.cordova.core.medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin rm')])
         return steps
 
     def deploy_steps(self):
         steps = [ShellCommand(command=["cp", "platforms/blackberry10/www/config.xml", "./config.xml"], workdir='build/mobilespec', haltOnFailure=True, description='Plugin add')]
-        steps.extend(super(PlatformTest_Blackberry, self).deploy_steps())
+        steps.extend(super(PlatformTestBlackberry, self).deploy_steps())
         return steps
 
-if(build_ios):
+if CONFIG.has_platform("ios"):
     factory_IOS_master = BuildFactory()
-    factory_IOS_master.addSteps(PlatformTest_iOS().get_all_steps())
+    factory_IOS_master.addSteps(PlatformTestIOS().get_all_steps())
     c['builders'].append(BuilderConfig(name="IOS", slavenames=["cordova-ios-slave"], factory=factory_IOS_master))
 
-if(build_android):
+if CONFIG.has_platform("android"):
     factory_Android_master = BuildFactory()
-    factory_Android_master.addSteps(PlatformTest_Android().get_all_steps())
+    factory_Android_master.addSteps(PlatformTestAndroid().get_all_steps())
     c['builders'].append(BuilderConfig(name="Android", slavenames=["cordova-android-slave"], factory=factory_Android_master))
 
     factory_Android_build_only = BuildFactory()
-    factory_Android_build_only.addSteps(PlatformTest_Android().get_build_steps())
+    factory_Android_build_only.addSteps(PlatformTestAndroid().get_all_steps())
     c['builders'].append(BuilderConfig(name="AndroidWin", slavenames=["cordova-windows-slave"], factory=factory_Android_build_only))
 
-if(build_wp8):
+if CONFIG.has_platform("wp8"):
     factory_wp8 = BuildFactory()
-    factory_wp8.addSteps(PlatformTest_WP8().get_all_steps())
+    factory_wp8.addSteps(PlatformTestWP8().get_all_steps())
     c['builders'].append(BuilderConfig(name="WP8", slavenames=["cordova-windows-slave"], factory=factory_wp8))
     c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_wp8))
 
-if(build_windows8):
-    factory_windows8 = BuildFactory()
-    factory_windows8.addSteps(PlatformTest_Windows8().get_all_steps())
-    c['builders'].append(BuilderConfig(name="Windows", slavenames=["cordova-windows-slave"], factory=factory_windows8))
-    c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_windows8))
+if CONFIG.has_platform("windows"):
+    c['builders'].append(BuilderConfig(name="Windows", slavenames=["cordova-windows-slave"], factory=PlatformTestWindows().get_default_factory()))
+    c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=PlatformTestWindows().get_default_factory()))
 
-if(build_blackberry):
+if CONFIG.has_platform("blackberry"):
     factory_BlackBerry = BuildFactory()
-    factory_BlackBerry.addSteps(PlatformTest_Blackberry().get_all_steps())
+    factory_BlackBerry.addSteps(PlatformTestBlackberry().get_all_steps())
     c['builders'].append(BuilderConfig(name="BlackBerry", slavenames=["cordova-blackberry-slave"], factory=factory_BlackBerry))
 
-import platform
-
-# TODO. temporary disable separate cli and plugman tests on Windows
-# if not platform.system() == "Windows" :
-factory_cli = BuildFactory()
-factory_cli.addStep(ShellCommand(command=["rm","-rf","cordova-*"],workdir='build',haltOnFailure=False,description='Cordova Clean'))
-factory_cli.addSteps(cli_steps)
-c['builders'].append(BuilderConfig(name="Tools_CLI",slavenames=["cordova-common-slave"],factory=factory_cli))
-
-#    factory_plugman = BuildFactory()
-#    factory_plugman.addSteps(plugman_steps)
-#    c['builders'].append(BuilderConfig(name="Tools_Plugman",slavenames=["cordova-common-slave"],factory=factory_plugman))
-
-if build_chrome:
+if CONFIG.has_platform("chrome"):
     factory_chrome_desktop = BuildFactory()
     factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
-    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
+    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", "-b", CONFIG.branches['TESTMASTER'], CONFIG.repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
     # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
     factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
     factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean Chromespec', descriptionDone='Clean Chromespec'))
-    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch Chromespec', descriptionDone='Fetch Chromespec'))
+    factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", CONFIG.repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch Chromespec', descriptionDone='Fetch Chromespec'))
     factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
     factory_chrome_desktop.addStep(ShellCommand(command=["node", "medic/runner/testrunner.js", "--cmd=medic/runner/runchrome.sh", "--path=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests", "--args=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='Run Chrome', descriptionDone='Run Chrome'))
     c['builders'].append(BuilderConfig(name="ZChrome_Desktop", slavenames=["cordova-common-slave"], factory=factory_chrome_desktop))
 
     factory_chrome_mobile = BuildFactory()
     factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "-b", branches['TESTMASTER'], repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "-b", CONFIG.branches['TESTMASTER'], CONFIG.repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
     # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
     factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
     factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
 
     factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean cca', descriptionDone='Clean cca'))
-    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "--recurse-submodules", repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch cca', descriptionDone='Fetch cca'))
+    factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "--recurse-submodules", CONFIG.repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch cca', descriptionDone='Fetch cca'))
     factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/mobile-chrome-apps', haltOnFailure=True, description='Install cca', descriptionDone='Install cca'))
     factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "ccatest"], workdir='build', haltOnFailure=True, description='Clean ccatest', descriptionDone='Clean ccatest'))
     factory_chrome_mobile.addStep(ShellCommand(command=["mobile-chrome-apps/src/cca.js", "create", "ccatest", "--copy-from", "mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='cca create', descriptionDone='cca create'))
@@ -327,6 +304,15 @@ if build_chrome:
     factory_chrome_mobile.addStep(ShellCommand(command=["node", "../medic/runner/testrunner.js", "--ip=192.168.1.122", "--port=6800", "--cmd=../medic/runner/runcca.sh", "--path=www", "--args=android"], workdir='build/ccatest', timeout=300, haltOnFailure=True, description='Run Mobile', descriptionDone='Run Mobile'))
     c['builders'].append(BuilderConfig(name="ZChrome_Mobile", slavenames=["cordova-android-slave"], factory=factory_chrome_mobile))
 
+factory_cli = BuildFactory()
+factory_cli.addStep(ShellCommand(command=["rm","-rf","cordova-*"],workdir='build',haltOnFailure=False,description='Cordova Clean'))
+factory_cli.addSteps(PlatformTestBase().cli_steps())
+c['builders'].append(BuilderConfig(name="Tools_CLI",slavenames=["cordova-common-slave"],factory=factory_cli))
+
+# factory_plugman = BuildFactory()
+# factory_plugman.addSteps(PlatformTestBase().plugman_steps())
+# c['builders'].append(BuilderConfig(name="Tools_Plugman",slavenames=["cordova-common-slave"],factory=factory_plugman))
+
 #mail status
 
 # Store these here for now, not sure if we'll use them.
@@ -338,15 +324,3 @@ if build_chrome:
 # mail_from = str(json_config['mail']['from'])
 # mail_pw = str(json_config['mail']['password'])
 # mail_serverURL = str(json_config['mail']['serverURL'])
-
-#irc status
-
-from buildbot.status import words
-c['status'].append(words.IRC(host="irc.freenode.net", nick="cordova-bot",
-                              allowForce=True,
-                              channels=["#asftest"],
-			      notify_events={
-				'successToFailure': 1,
-				'failureToSuccess': 1,
-				},
-                              categories=["cordova-weinre"]))
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[4/7] cordova-medic git commit: fixes createmobilespec failure due to lack of cordova-plugman repo

Posted by an...@apache.org.
fixes createmobilespec failure due to lack of cordova-plugman repo

* Add builders using get_default_factory()


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/9bb8e0ba
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/9bb8e0ba
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/9bb8e0ba

Branch: refs/heads/master
Commit: 9bb8e0ba765ca597bfacb4006e4992426f552b99
Parents: 806e218
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Mon Dec 1 18:51:00 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Dec 2 12:13:01 2014 +0300

----------------------------------------------------------------------
 cordova.conf | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9bb8e0ba/cordova.conf
----------------------------------------------------------------------
diff --git a/cordova.conf b/cordova.conf
index 4e9f9c1..6ec1b55 100644
--- a/cordova.conf
+++ b/cordova.conf
@@ -149,7 +149,9 @@ class PlatformTestBase(object):
         return [
             ShellCommand(command=["npm", "install"], workdir='build/cordova-mobile-spec/createmobilespec', haltOnFailure=True, description='Install createmobilespec'),
             ShellCommand(command=["cordova-coho/coho", "npm-link"], workdir='build', haltOnFailure=True, description='COHO npm-link'),
-            ShellCommand(command=["cordova-mobile-spec/createmobilespec/createmobilespec", "--" + platform, "mobilespec"], workdir='build', haltOnFailure=True, description='Run createmobilespec'),
+            # add --skiplink for createmobilespec since
+            # it requires cordova-plugman repo to be cloned
+            ShellCommand(command=["cordova-mobile-spec/createmobilespec/createmobilespec", "--" + platform, "mobilespec", "--debug", "--skiplink"], workdir='build', haltOnFailure=True, description='Run createmobilespec'),
             ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../medic/cordova-plugin-medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin add'),
             ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config')
         ]
@@ -246,33 +248,22 @@ class PlatformTestBlackberry(PlatformTestBase):
         return steps
 
 if CONFIG.has_platform("ios"):
-    factory_IOS_master = BuildFactory()
-    factory_IOS_master.addSteps(PlatformTestIOS().get_all_steps())
-    c['builders'].append(BuilderConfig(name="IOS", slavenames=["cordova-ios-slave"], factory=factory_IOS_master))
+    c['builders'].append(BuilderConfig(name="IOS", slavenames=["cordova-ios-slave"], factory=PlatformTestIOS().get_default_factory()))
 
 if CONFIG.has_platform("android"):
-    factory_Android_master = BuildFactory()
-    factory_Android_master.addSteps(PlatformTestAndroid().get_all_steps())
-    c['builders'].append(BuilderConfig(name="Android", slavenames=["cordova-android-slave"], factory=factory_Android_master))
-
-    factory_Android_build_only = BuildFactory()
-    factory_Android_build_only.addSteps(PlatformTestAndroid().get_all_steps())
-    c['builders'].append(BuilderConfig(name="AndroidWin", slavenames=["cordova-windows-slave"], factory=factory_Android_build_only))
+    c['builders'].append(BuilderConfig(name="Android", slavenames=["cordova-android-slave"], factory=PlatformTestAndroid().get_default_factory()))
+    c['builders'].append(BuilderConfig(name="AndroidWin", slavenames=["cordova-windows-slave"], factory=PlatformTestAndroid().get_default_factory()))
 
 if CONFIG.has_platform("wp8"):
-    factory_wp8 = BuildFactory()
-    factory_wp8.addSteps(PlatformTestWP8().get_all_steps())
-    c['builders'].append(BuilderConfig(name="WP8", slavenames=["cordova-windows-slave"], factory=factory_wp8))
-    c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_wp8))
+    c['builders'].append(BuilderConfig(name="WP8", slavenames=["cordova-windows-slave"], factory=PlatformTestWP8().get_default_factory()))
+    c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=PlatformTestWP8().get_default_factory()))
 
 if CONFIG.has_platform("windows"):
     c['builders'].append(BuilderConfig(name="Windows", slavenames=["cordova-windows-slave"], factory=PlatformTestWindows().get_default_factory()))
     c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=PlatformTestWindows().get_default_factory()))
 
 if CONFIG.has_platform("blackberry"):
-    factory_BlackBerry = BuildFactory()
-    factory_BlackBerry.addSteps(PlatformTestBlackberry().get_all_steps())
-    c['builders'].append(BuilderConfig(name="BlackBerry", slavenames=["cordova-blackberry-slave"], factory=factory_BlackBerry))
+    c['builders'].append(BuilderConfig(name="BlackBerry", slavenames=["cordova-blackberry-slave"], factory=PlatformTestBlackberry().get_default_factory()))
 
 if CONFIG.has_platform("chrome"):
     factory_chrome_desktop = BuildFactory()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[5/7] cordova-medic git commit: Improvements and unnecessary steps cleanup

Posted by an...@apache.org.
Improvements and unnecessary steps cleanup

* remove prepare cordova-lib and link cordova-lib steps from cli_steps group since `coho npm-link` do the same job
* remove build_cordovajs_steps and copy_cordovajs_steps since this routines is handled by mobilespec now
* remove unused writejson.js file
* remove whitelist rules removal logic from updateconfig.js since windows platform handles whitelists correctly


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/4ee3512d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/4ee3512d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/4ee3512d

Branch: refs/heads/master
Commit: 4ee3512d3bec5737534fb5277177426c90b0a398
Parents: 9bb8e0b
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Tue Dec 2 13:54:30 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Dec 2 13:54:30 2014 +0300

----------------------------------------------------------------------
 build_js.js     | 14 -------------
 cordova.conf    | 29 +++------------------------
 updateconfig.js | 20 ++++++-------------
 writejson.js    | 56 ----------------------------------------------------
 4 files changed, 9 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/4ee3512d/build_js.js
----------------------------------------------------------------------
diff --git a/build_js.js b/build_js.js
deleted file mode 100644
index bfbfdae..0000000
--- a/build_js.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var fs = require('fs');
-var exec = require('child_process').exec;
-var child;
-
-if(process.argv.slice(2)[0] == 'windows8') {
-	var versionPath = '../cordova-windows/version';
-}
-else {
-	var versionPath = '../cordova-' + process.argv.slice(2)[0] + '/version';
-}
-
-var versionContents = fs.readFileSync(versionPath, "utf-8");
-child = exec('grunt --platformVersion=' + versionContents, function(err,stdout,stderr){
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/4ee3512d/cordova.conf
----------------------------------------------------------------------
diff --git a/cordova.conf b/cordova.conf
index 6ec1b55..fe42497 100644
--- a/cordova.conf
+++ b/cordova.conf
@@ -117,11 +117,9 @@ class PlatformTestBase(object):
 
     def cli_steps(self):
         return [
-            ShellCommand(command=["git", "clone", "-b", CONFIG.branches['CLI'], CONFIG.repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Get CLI'),
-            ShellCommand(command=["mkdir", "node_modules"], workdir='build/cordova-cli', haltOnFailure=True, description='Prepare cordova-lib'),
-            ShellCommand(command=["git", "clone", "--depth", "1", "-b", CONFIG.branches['CORDOVA-LIB'], CONFIG.repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Update cordova-lib'),
-            ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../../cordova-lib/cordova-lib', 'cordova-lib', 'dir')"], workdir='build/cordova-cli/node_modules', haltOnFailure=False, description='Link cordova-lib'),
-            ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-cli/node_modules/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
+            ShellCommand(command=["git", "clone", "-b", CONFIG.branches['CLI'], CONFIG.repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Clone CLI'),
+            ShellCommand(command=["git", "clone", "--depth", "1", "-b", CONFIG.branches['CORDOVA-LIB'], CONFIG.repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Clone cordova-lib'),
+            ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-lib/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
             ShellCommand(command=["rm", "-f", "npm-shrinkwrap.json"], workdir='build/cordova-cli', haltOnFailure=False, description='Remove CLI SW'),
             ShellCommand(command=["npm", "install"], workdir='build/cordova-cli', haltOnFailure=True, description='Install CLI'),
             ShellCommand(command=["npm", "test"], workdir='build/cordova-cli', haltOnFailure=True, description='Test CLI'),
@@ -135,12 +133,6 @@ class PlatformTestBase(object):
             ShellCommand(command=["npm", "test"], workdir='build/cordova-plugman', haltOnFailure=True, description='Test Plugman'),
         ]
 
-    def build_cordovajs_steps(self):
-        return [
-            ShellCommand(command=["npm", "install"], workdir='build/cordova-js', description='Install Grunt'),
-            ShellCommand(command=["node", "../medic/build_js.js", self.platform], workdir='build/cordova-js', description='Grunt')
-        ]
-
     def prepare_mobilespec_steps(self):
         platform = self.platform
         # required by coho tools to correctly resolve repo location
@@ -156,9 +148,6 @@ class PlatformTestBase(object):
             ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config')
         ]
 
-    def copy_cordovajs_steps(self):
-        return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova." + self.platform + ".js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
-
     def deploy_steps(self):
         return [ShellCommand(command=["node", "medic/build_" + self.platform + ".js"], workdir='build', timeout=CONFIG.build_timeout, description='Deploy', name='Deploy')]
 
@@ -170,9 +159,7 @@ class PlatformTestBase(object):
         steps.extend(self.init_workspace_steps())
         steps.extend(self.repos_clone_steps())
         steps.extend(self.cli_steps())
-        steps.extend(self.build_cordovajs_steps())
         steps.extend(self.prepare_mobilespec_steps())
-        steps.extend(self.copy_cordovajs_steps())
         steps.extend(self.deploy_steps())
         return steps
 
@@ -194,10 +181,6 @@ class PlatformTestWP8(PlatformTestBase):
 
     def __init__(self):
         super(PlatformTestWP8, self).__init__('wp8')
-    # override cordova.js copy step since grunt builds it as cordova.windowsphone.js, not cordova.wp8.js
-
-    def copy_cordovajs_steps(self):
-        return [ShellCommand(command=["cp", "-f", "cordova-js/pkg/cordova.windowsphone.js", "mobilespec/platforms/" + self.platform + "/platform_www/cordova.js"], workdir='build', haltOnFailure=True, description='Copy JS')]
 
     def repos_clone_steps(self):
         steps = super(PlatformTestWP8, self).repos_clone_steps()
@@ -210,12 +193,6 @@ class PlatformTestWindows(PlatformTestBase):
     def __init__(self):
         super(PlatformTestWindows, self).__init__('windows')
 
-    def copy_cordovajs_steps(self):
-        copy_cmd = "var fs=require('fs');"
-        copy_cmd += "var platform=fs.existsSync('mobilespec/platforms/windows8')?'windows8':'windows';"
-        copy_cmd += "fs.createReadStream('cordova-js/pkg/cordova.'+platform+'.js').pipe(fs.createWriteStream('mobilespec/platforms/'+platform+'/platform_www/cordova.js'));"
-        return [ShellCommand(command=["node", "-e", copy_cmd], workdir='build', haltOnFailure=False, description='Copy JS to Windows platform')]
-
     def deploy_steps(self):
         return [
             ShellCommand(command=["node", "medic/build_" + self.platform + ".js", "--store80"],

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/4ee3512d/updateconfig.js
----------------------------------------------------------------------
diff --git a/updateconfig.js b/updateconfig.js
index c3d7661..6ad7bb4 100644
--- a/updateconfig.js
+++ b/updateconfig.js
@@ -1,9 +1,9 @@
 // /usr/bin/env node
+/*jshint node: true*/
  
 var fs   = require('fs'),
     path = require('path'),
-    config = require('./config'),
-    argv = require('optimist').argv;
+    config = require('./config');
 
 //get parameters, that should been written to config.xml
 var entry_point = config.app.entry,
@@ -29,18 +29,10 @@ if (!fs.existsSync(configFile)){
                 '    <content src="' + entry_point + '"/>\n</widget>';
         }
 
-        // Whitelists support on windows 8 is broken and cause build errors
-        if (argv.windows || argv.windows8){
-            console.warn('Current platform is windows. Removing all whitelist rules.');
-            configContent = configContent.replace(/\s*<access\s+origin=.*\/>/gim, '');
-            //cleanup doubled line ends
-            configContent = configContent.replace('\n\n', '\n');
-        } else {
-            // add whitelisting rule allow access to couch server
-            console.log('Adding whitelist rule for CouchDB host: ' + couch_host);
-            configContent = configContent.split('</widget>').join('') +
-                '    <access origin="' + couch_host + '" />\n</widget>';
-        }
+        // add whitelisting rule allow access to couch server
+        console.log('Adding whitelist rule for CouchDB host: ' + couch_host);
+        configContent = configContent.split('</widget>').join('') +
+            '    <access origin="' + couch_host + '" />\n</widget>';
 
         fs.writeFileSync(configFile, configContent, 'utf-8');
     } catch (e) {

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/4ee3512d/writejson.js
----------------------------------------------------------------------
diff --git a/writejson.js b/writejson.js
deleted file mode 100644
index 132e5a6..0000000
--- a/writejson.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*jshint multistr: true */
-
-var path = require ('path');
-var shell = require('shelljs');
-var fs = require('fs');
-var argv = require('optimist').argv;
-
-var TEST_DIR=process.cwd();
-var MSPEC_DIR=path.join(TEST_DIR,'mobilespec');
-var BRANCH="dev";
-// required on Windows to correctly escape path delimiter character
-var TEST_DIR_ESCAPED = TEST_DIR.split("\\").join("\\\\");
-
-if(argv.branch) BRANCH=argv.branch;
-
-var cfgpath = path.join(MSPEC_DIR,'.cordova');
-
-if(!fs.existsSync(cfgpath)) fs.mkdirSync(cfgpath);
-
-fs.writeFileSync(path.join(MSPEC_DIR,'.cordova','config.json'),
-'{\
-  "id":"org.apache.mobilespec",\
-  "name":"mobilespec",\
-  "lib": {\
-    "android": {\
-      "uri": "'+TEST_DIR_ESCAPED+'/cordova-android",\
-      "version": "'+BRANCH+'" ,\
-      "id": "cordova-android-'+BRANCH+'"\
-    },\
-    "ios": {\
-      "uri": "'+TEST_DIR_ESCAPED+'/cordova-ios",\
-      "version": "'+BRANCH+'",\
-      "id": "cordova-ios-'+BRANCH+'"\
-    },\
-    "wp8": {\
-      "uri": "'+TEST_DIR_ESCAPED+'/cordova-wp8",\
-      "version": "'+BRANCH+'",\
-      "id": "cordova-wp8-'+BRANCH+'"\
-    },\
-    "windows8": {\
-      "uri": "'+TEST_DIR_ESCAPED+'/cordova-windows",\
-      "version": "'+BRANCH+'",\
-      "id": "cordova-windows-'+BRANCH+'"\
-    },\
-    "windows": {\
-      "uri": "'+TEST_DIR_ESCAPED+'/cordova-windows",\
-      "version": "'+BRANCH+'",\
-      "id": "cordova-windows-'+BRANCH+'"\
-    },\
-    "blackberry": {\
-      "uri": "'+TEST_DIR_ESCAPED+'/cordova-blackberry",\
-      "version": "'+BRANCH+'",\
-      "id": "cordova-blackberry-'+BRANCH+'"\
-    }\
-  }\
-}');
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org