mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
updating test for CB-916
This commit is contained in:
parent
24944cff22
commit
0a4d218010
@ -47,8 +47,8 @@ fi
|
|||||||
# cleanup after exit and/or on error
|
# cleanup after exit and/or on error
|
||||||
function on_exit {
|
function on_exit {
|
||||||
echo "Cleaning up ..."
|
echo "Cleaning up ..."
|
||||||
[ -f $BUILD_PATH/framework/libs/commons-codec-1.6.jar ] && rm $BUILD_PATH/framework/libs/commons-codec-1.6.jar
|
# [ -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
|
# [ -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/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
|
[ -f $BUILD_PATH/framework/cordova-$VERSION.jar ] && rm $BUILD_PATH/framework/cordova-$VERSION.jar
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,10 @@ function exec(s, output) {
|
|||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
// Cleanup
|
// Cleanup
|
||||||
if(fso.FileExists(ROOT + '\\framework\\libs\\commons-codec-1.6.jar')) {
|
// if(fso.FileExists(ROOT + '\\framework\\libs\\commons-codec-1.6.jar')) {
|
||||||
fso.DeleteFile(ROOT + '\\framework\\libs\\commons-codec-1.6.jar');
|
// fso.DeleteFile(ROOT + '\\framework\\libs\\commons-codec-1.6.jar');
|
||||||
fso.DeleteFolder(ROOT + '\\framework\\libs', true);
|
// fso.DeleteFolder(ROOT + '\\framework\\libs', true);
|
||||||
}
|
// }
|
||||||
if(fso.FileExists(ROOT + '\\framework\\cordova-'+VERSION+'.jar')) {
|
if(fso.FileExists(ROOT + '\\framework\\cordova-'+VERSION+'.jar')) {
|
||||||
fso.DeleteFile(ROOT + '\\framework\\cordova-'+VERSION+'.jar');
|
fso.DeleteFile(ROOT + '\\framework\\cordova-'+VERSION+'.jar');
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,15 @@ var create_project = spawn(build_path + '/bin/create',
|
|||||||
package_name,
|
package_name,
|
||||||
project_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) {
|
create_project.on('exit', function(code) {
|
||||||
|
|
||||||
assert.equal(code, 0, 'Project did not get created');
|
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
|
// make sure the build directory was cleaned up
|
||||||
path.exists(build_path + '/framework/libs', function(exists) {
|
// path.exists(build_path + '/framework/libs', function(exists) {
|
||||||
assert(!exists, 'libs directory did not get cleaned up');
|
// assert(!exists, 'libs directory did not get cleaned up');
|
||||||
});
|
// });
|
||||||
path.exists(build_path + util.format('/framework/assets/cordova-%s.js', version), function(exists) {
|
path.exists(build_path + util.format('/framework/assets/cordova-%s.js', version), function(exists) {
|
||||||
assert(!exists, 'javascript file did not get cleaned up');
|
assert(!exists, 'javascript file did not get cleaned up');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user