Updated Branches: refs/heads/master 34820f434 -> 0a4d21801
updating test for CB-916 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/0a4d2180 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/0a4d2180 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/0a4d2180 Branch: refs/heads/master Commit: 0a4d218010f343d15b25f6089183aded60dd310a Parents: 24944cf Author: Anis Kadri <[email protected]> Authored: Wed Jun 13 15:52:26 2012 -0700 Committer: Anis Kadri <[email protected]> Committed: Wed Jun 13 15:52:26 2012 -0700 ---------------------------------------------------------------------- bin/create | 4 ++-- bin/create.js | 8 ++++---- bin/tests/test_create_unix.js | 15 ++++++++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/0a4d2180/bin/create ---------------------------------------------------------------------- diff --git a/bin/create b/bin/create index 2b3fe05..a6b5c8c 100755 --- a/bin/create +++ b/bin/create @@ -47,8 +47,8 @@ fi # cleanup after exit and/or on error function on_exit { echo "Cleaning up ..." - [ -f $BUILD_PATH/framework/libs/commons-codec-1.6.jar ] && rm $BUILD_PATH/framework/libs/commons-codec-1.6.jar - [ -d $BUILD_PATH/framework/libs ] && rmdir $BUILD_PATH/framework/libs + # [ -f $BUILD_PATH/framework/libs/commons-codec-1.6.jar ] && rm $BUILD_PATH/framework/libs/commons-codec-1.6.jar + # [ -d $BUILD_PATH/framework/libs ] && rmdir $BUILD_PATH/framework/libs [ -f $BUILD_PATH/framework/assets/www/cordova-$VERSION.js ] && rm $BUILD_PATH/framework/assets/www/cordova-$VERSION.js [ -f $BUILD_PATH/framework/cordova-$VERSION.jar ] && rm $BUILD_PATH/framework/cordova-$VERSION.jar } http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/0a4d2180/bin/create.js ---------------------------------------------------------------------- diff --git a/bin/create.js b/bin/create.js index 1822055..46fd006 100644 --- a/bin/create.js +++ b/bin/create.js @@ -52,10 +52,10 @@ function exec(s, output) { function cleanup() { // Cleanup - if(fso.FileExists(ROOT + '\\framework\\libs\\commons-codec-1.6.jar')) { - fso.DeleteFile(ROOT + '\\framework\\libs\\commons-codec-1.6.jar'); - fso.DeleteFolder(ROOT + '\\framework\\libs', true); - } +// if(fso.FileExists(ROOT + '\\framework\\libs\\commons-codec-1.6.jar')) { +// fso.DeleteFile(ROOT + '\\framework\\libs\\commons-codec-1.6.jar'); +// fso.DeleteFolder(ROOT + '\\framework\\libs', true); +// } if(fso.FileExists(ROOT + '\\framework\\cordova-'+VERSION+'.jar')) { fso.DeleteFile(ROOT + '\\framework\\cordova-'+VERSION+'.jar'); } http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/0a4d2180/bin/tests/test_create_unix.js ---------------------------------------------------------------------- diff --git a/bin/tests/test_create_unix.js b/bin/tests/test_create_unix.js index 3462f29..75e0697 100644 --- a/bin/tests/test_create_unix.js +++ b/bin/tests/test_create_unix.js @@ -20,6 +20,15 @@ var create_project = spawn(build_path + '/bin/create', package_name, project_name]); +process.on('uncaughtException', function (err) { + console.log('Caught exception: ' + err); + spawn('rm', ['-rf', project_path], function(code) { + if(code != 0) { + console.log("Could not delete project directory"); + } + }); +}); + create_project.on('exit', function(code) { assert.equal(code, 0, 'Project did not get created'); @@ -30,9 +39,9 @@ create_project.on('exit', function(code) { }); // 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 + '/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'); });
