deleting old stuff
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/24944cff Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/24944cff Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/24944cff Branch: refs/heads/master Commit: 24944cff22ba0481cc28204578512ae811b42a6c Parents: 34820f4 Author: Anis Kadri <[email protected]> Authored: Wed Jun 13 15:42:31 2012 -0700 Committer: Anis Kadri <[email protected]> Committed: Wed Jun 13 15:42:31 2012 -0700 ---------------------------------------------------------------------- bin/autotest | 2 - bin/bench | 47 ------------------ bin/package.json | 4 -- bin/test | 44 ----------------- bin/test_create_unix.js | 90 ----------------------------------- bin/tests/autotest.coffee | 24 --------- bin/tests/create.coffee | 40 ---------------- bin/tests/debug.coffee | 18 ------- bin/tests/test_create_unix.js | 91 ++++++++++++++++++++++++++++++++++++ 9 files changed, 91 insertions(+), 269 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/autotest ---------------------------------------------------------------------- diff --git a/bin/autotest b/bin/autotest deleted file mode 100755 index 647a5f5..0000000 --- a/bin/autotest +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/env node -require('nodeunit').reporters.default.run(['bin/tests']) http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/bench ---------------------------------------------------------------------- diff --git a/bin/bench b/bin/bench deleted file mode 100755 index e0de384..0000000 --- a/bin/bench +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -# Creates an app in `./bench` that posts results to http://cordova-bench.heroku.com with current cordova/Android sha. -# -# USAGE -# ./bin/bench -# - -# clobber any existing bench -if [ -e ./bench ] -then - rm -rf ./bench -fi - -# create a benching app -./bin/create ./bench org.apache.cordova.bench cordovaBench - -# grab the latest bench www code -git clone [email protected]:brianleroux/cordova-bench.git - -# copy it into the app -cat ./cordova-bench/www/index.html > ./bench/assets/www/index.html -#cat ~/Desktop/cordova-bench/www/index.html > ./bench/assets/www/index.html - -# clean up -rm -rf ./cordova-bench - -# launch to the first device found -./bin/debug ./bench http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/package.json ---------------------------------------------------------------------- diff --git a/bin/package.json b/bin/package.json index 81d3900..27cb0eb 100644 --- a/bin/package.json +++ b/bin/package.json @@ -18,9 +18,5 @@ "repository": { "type": "git", "url": "http://git-wip-us.apache.org/repos/asf/incubator-cordova-android.git" - }, - "dependencies":{ - "coffee-script":"1.1.2", - "nodeunit":"0.5.3" } } http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/test ---------------------------------------------------------------------- diff --git a/bin/test b/bin/test deleted file mode 100755 index 7e5d05e..0000000 --- a/bin/test +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -set -e - -VERSION=$(cat ./VERSION) - -# get the latest mobile-spec -git clone [email protected]:callback/callback-test.git - -# clobber test if it exists -if [ -e ./test ] -then - rm -rf ./test -fi - -# generate a working proj -./bin/create ./test org.apache.cordova.test CordovaTest - -# kill the default app and replace it w/ mobile-spec -rm -rf ./test/assets/www -mv ./callback-test ./test/assets/www - -# copy in cordova.js since www dir was replaced above -cp ./framework/assets/www/cordova-$VERSION.js ./test/assets/www/cordova-$VERSION.js - -# build it, launch it and start logging on stdout -cd ./test && ./cordova/debug && ./cordova/log http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/test_create_unix.js ---------------------------------------------------------------------- diff --git a/bin/test_create_unix.js b/bin/test_create_unix.js deleted file mode 100644 index 13fa29f..0000000 --- a/bin/test_create_unix.js +++ /dev/null @@ -1,90 +0,0 @@ -var project_path = '/tmp/example', - package_name = 'org.apache.cordova.example', - package_as_path = 'org/apache/cordova/example', - project_name = 'cordovaExample'; - -var path = require('path'), - fs = require('fs'), - util = require('util'), - assert = require('assert'), - spawn = require('child_process').spawn; - -var version = fs.readFileSync(__dirname + '/../VERSION').toString().replace('\n', ''); - -assert(version !== undefined); -assert(version !== ''); - -var create_project = spawn(__dirname + '/create', - [project_path, - package_name, - project_name]); - -create_project.on('exit', function(code) { - - assert.equal(code, 0, 'Project did not get created'); - - // make sure the project was created - path.exists(project_path, function(exists) { - assert(exists, 'Project path does not exist'); - }); - - // make sure the build directory was cleaned up - path.exists(__dirname + '/framework/libs', function(exists) { - assert(!exists, 'libs directory did not get cleaned up'); - }); - path.exists(__dirname + util.format('/framework/assets/cordova-%s.js', version), function(exists) { - assert(!exists, 'javascript file did not get cleaned up'); - }); - path.exists(__dirname + util.format('/framework/cordova-%s.jar', version), function(exists) { - assert(!exists, 'jar file did not get cleaned up'); - }); - - // make sure AndroidManifest.xml was added - path.exists(util.format('%s/AndroidManifest.xml', project_path), function(exists) { - assert(exists, 'AndroidManifest.xml did not get created'); - // TODO check that the activity name was properly substituted - }); - - // make sure main Activity was added - path.exists(util.format('%s/src/%s/%s.java', project_path, package_as_path, project_name), function(exists) { - assert(exists, 'Activity did not get created'); - // TODO check that package name and activity name were substitued properly - }); - - // make sure plugins.xml was added - path.exists(util.format('%s/res/xml/plugins.xml', project_path), function(exists) { - assert(exists, 'plugins.xml did not get created'); - }); - - // make sure cordova.xml was added - path.exists(util.format('%s/res/xml/cordova.xml', project_path), function(exists) { - assert(exists, 'plugins.xml did not get created'); - }); - - // make sure cordova.jar was added - path.exists(util.format('%s/libs/cordova-%s.jar', project_path, version), function(exists) { - assert(exists, 'cordova.jar did not get added'); - }); - - // make sure cordova.js was added - path.exists(util.format('%s/assets/www/cordova-%s.js', project_path, version), function(exists) { - assert(exists, 'cordova.js did not get added'); - }); - - // check that project compiles && creates a cordovaExample-debug.apk - var compile_project = spawn('ant', ['debug'], {cwd: project_path}); - - compile_project.on('exit', function(code) { - assert.equal(code, 0, 'Cordova Android Project does not compile'); - // make sure cordovaExample-debug.apk was created - path.exists(util.format('%s/bin/%s-debug.apk', project_path, project_name), function(exists) { - assert(exists, 'Package did not get created'); - - // if project compiles properly just AXE it - spawn('rm', ['-rf', project_path], function(code) { - assert.equal(code, 0, 'Could not remove project directory'); - }); - }); - }); - -}); http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/tests/autotest.coffee ---------------------------------------------------------------------- diff --git a/bin/tests/autotest.coffee b/bin/tests/autotest.coffee deleted file mode 100644 index 1ee4c39..0000000 --- a/bin/tests/autotest.coffee +++ /dev/null @@ -1,24 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - - -exports['you are sane'] = (test) -> - test.expect 1 - test.ok true, "this assertion should always pass" - test.done() http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/tests/create.coffee ---------------------------------------------------------------------- diff --git a/bin/tests/create.coffee b/bin/tests/create.coffee deleted file mode 100644 index 6c87af4..0000000 --- a/bin/tests/create.coffee +++ /dev/null @@ -1,40 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -util = require 'util' -exec = require('child_process').exec -path = require 'path' - -exports['default example project is generated'] = (test) -> - test.expect 1 - exec './bin/create', (error, stdout, stderr) -> - test.ok true, "this assertion should pass" unless error? - test.done() - -exports['default example project has a ./.cordova folder'] = (test) -> - test.expect 1 - path.exists './example/.cordova', (exists) -> - test.ok exists, 'the cordova folder exists' - test.done() - -exports['default example project has a /cordova folder'] = (test) -> - test.expect 1 - path.exists './example/cordova', (exists) -> - test.ok exists, 'the other cordova folder exists' - test.done() http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/tests/debug.coffee ---------------------------------------------------------------------- diff --git a/bin/tests/debug.coffee b/bin/tests/debug.coffee deleted file mode 100644 index a5d9eba..0000000 --- a/bin/tests/debug.coffee +++ /dev/null @@ -1,18 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/tests/test.coffee ---------------------------------------------------------------------- diff --git a/bin/tests/test.coffee b/bin/tests/test.coffee deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/24944cff/bin/tests/test_create_unix.js ---------------------------------------------------------------------- diff --git a/bin/tests/test_create_unix.js b/bin/tests/test_create_unix.js new file mode 100644 index 0000000..3462f29 --- /dev/null +++ b/bin/tests/test_create_unix.js @@ -0,0 +1,91 @@ +var build_path = __dirname + '/../..', + project_path = '/tmp/example', + package_name = 'org.apache.cordova.example', + package_as_path = 'org/apache/cordova/example', + project_name = 'cordovaExample'; + +var path = require('path'), + fs = require('fs'), + util = require('util'), + assert = require('assert'), + spawn = require('child_process').spawn; + +var version = fs.readFileSync(build_path + '/VERSION').toString().replace('\n', ''); + +assert(version !== undefined); +assert(version !== ''); + +var create_project = spawn(build_path + '/bin/create', + [project_path, + package_name, + project_name]); + +create_project.on('exit', function(code) { + + assert.equal(code, 0, 'Project did not get created'); + + // make sure the project was created + path.exists(project_path, function(exists) { + assert(exists, 'Project path does not exist'); + }); + + // make sure the build directory was cleaned up + path.exists(build_path + '/framework/libs', function(exists) { + assert(!exists, 'libs directory did not get cleaned up'); + }); + path.exists(build_path + util.format('/framework/assets/cordova-%s.js', version), function(exists) { + assert(!exists, 'javascript file did not get cleaned up'); + }); + path.exists(build_path + util.format('/framework/cordova-%s.jar', version), function(exists) { + assert(!exists, 'jar file did not get cleaned up'); + }); + + // make sure AndroidManifest.xml was added + path.exists(util.format('%s/AndroidManifest.xml', project_path), function(exists) { + assert(exists, 'AndroidManifest.xml did not get created'); + // TODO check that the activity name was properly substituted + }); + + // make sure main Activity was added + path.exists(util.format('%s/src/%s/%s.java', project_path, package_as_path, project_name), function(exists) { + assert(exists, 'Activity did not get created'); + // TODO check that package name and activity name were substitued properly + }); + + // make sure plugins.xml was added + path.exists(util.format('%s/res/xml/plugins.xml', project_path), function(exists) { + assert(exists, 'plugins.xml did not get created'); + }); + + // make sure cordova.xml was added + path.exists(util.format('%s/res/xml/cordova.xml', project_path), function(exists) { + assert(exists, 'plugins.xml did not get created'); + }); + + // make sure cordova.jar was added + path.exists(util.format('%s/libs/cordova-%s.jar', project_path, version), function(exists) { + assert(exists, 'cordova.jar did not get added'); + }); + + // make sure cordova.js was added + path.exists(util.format('%s/assets/www/cordova-%s.js', project_path, version), function(exists) { + assert(exists, 'cordova.js did not get added'); + }); + + // check that project compiles && creates a cordovaExample-debug.apk + var compile_project = spawn('ant', ['debug'], {cwd: project_path}); + + compile_project.on('exit', function(code) { + assert.equal(code, 0, 'Cordova Android Project does not compile'); + // make sure cordovaExample-debug.apk was created + path.exists(util.format('%s/bin/%s-debug.apk', project_path, project_name), function(exists) { + assert(exists, 'Package did not get created'); + + // if project compiles properly just AXE it + spawn('rm', ['-rf', project_path], function(code) { + assert.equal(code, 0, 'Could not remove project directory'); + }); + }); + }); + +});
