From f06a1a416185f1c283ed2c1368cee6ea551c2f39 Mon Sep 17 00:00:00 2001 From: kiswa Date: Fri, 6 May 2016 00:31:44 +0000 Subject: [PATCH] Generate tests.db on test run --- .gitignore | 1 + gulpfile.js | 14 +++++++++++--- package.json | 1 + tests.db | Bin 13312 -> 0 bytes 4 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 tests.db diff --git a/.gitignore b/.gitignore index 1816c5f..ad72594 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ coverage.html dist node_modules src/api/vendor +tests.db typings diff --git a/gulpfile.js b/gulpfile.js index ed3d5f6..18f22f7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -3,6 +3,7 @@ let gulp = require('gulp'), fs = require('fs'), del = require('del'), + touch = require('touch'), merge = require('merge-stream'), SystemBuilder = require('systemjs-builder'), @@ -147,12 +148,18 @@ gulp.task('coverage', ['tsc'], () => { .pipe(gulp.dest('./')); }); -gulp.task('test-api', () => { +gulp.task('api-test-db', () => { + del('tests.db'); + touch('tests.db'); + fs.chmod('tests.db', '0666'); +}); + +gulp.task('test-api', ['api-test-db'], () => { return gulp.src('phpunit.xml') .pipe(phpunit('./src/api/vendor/phpunit/phpunit/phpunit')); }); -gulp.task('test-api-single', () => { +gulp.task('test-api-single', ['api-test-db'], () => { return gulp.src('phpunit.xml') .pipe(phpunit('./src/api/vendor/phpunit/phpunit/phpunit', { group: 'single' })); @@ -182,7 +189,8 @@ gulp.task('watchtests', () => { watchTs = gulp.watch(paths.ts, ['test-app']), onChanged = (event) => { - console.log('File ' + event.path + ' was ' + event.type + '. Running tasks...'); + console.log('File ' + event.path + ' was ' + event.type + + '. Running tasks...'); }; watchTests.on('change', onChanged); diff --git a/package.json b/package.json index 03a412c..25ac306 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "scss-base": "^1.1.0", "systemjs": "^0.19.27", "systemjs-builder": "^0.15.16", + "touch": "^1.0.0", "typings": "^0.8.1", "zone.js": "^0.6.12" } diff --git a/tests.db b/tests.db deleted file mode 100644 index b4a5e03cb65c1bf06151bf5b7b45ceaf1d2c3218..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13312 zcmWFz^vNtqRY=P(%1ta$FlJz3U}R))P*7lC5HMk2VBlq7U|?ZjVBlt8;5h?jGe7|& zl*U5|m@w!*;{qAN$h?k$c^$JE(_Y3i4D%SaV`yqLVPh9pR%UF{FG)K0XTmehQ%hE+B8ig*1y;*~Q%@ z85;#N^HNePz(jmneo<;>dR}&FWqfjePHAplJlKH{HXAhLJpEi;BNXsz09lv-(UqW} z0X8E(GeuLOv6zKjTvC#;*%2H=5ET%T6>2&(ULb;`MM+*_ZYnHb3-XIIK{1aM_>D~5 z?BcDX{{SFdNP|$#wR>sUO zE-ud4=neKXI5fZn6Vzy^m%(BnA7`czkpy)V5|I3>kdRp%pO{>dS%ye%ngL8~;@aAb zkzi|!3v)6{QsawL3rkb;l2g&R%qUJllhgoNq*I()s0qoNzZjT*VdThBfzc2c4S``B z0xXOy47{A6{12+(nZGe#1i@kJ-BFK?hQP250Zv9{aYk@!gNdDmS(FphSYcpbP~${u z3^On=h%rJMVN4v1%;KD2_0S;UVqjokV_;xlg|zh4b!SF)`cE!ju!{Fgmuw6|~ob2MFqKqx+;CWh*i6D$NISdj4%?*QQ`iYnw zR?tZ(PE9T?$}Fjj&q*yy%|V(62N?yL(S=Qw7boVFz}N+e#l_|MMJe$aiNzT(!PMNu z%p4d8GNp|OEF^EE-82W1%ZBe8af$IFx76oYiB&fzDW_e^ICkOjrX;DzOg-t<= pVzmCJfAKYH<7fyBh7bVt|B>?l==z?)5GkW>7!3hBg#f7i4*=Wr%PRl?