forked from zodman/opengift.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
40 lines (34 loc) · 1.03 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var gulp = require('gulp');
var watch = require('gulp-watch');
var shell = require('gulp-shell');
var root_path = process.cwd();
var get_path = function(evt) {
return evt.path.replace(root_path + '/', '')
.replace('.robot','')
.replace(/\//g,'.')
.replace('.__init__','')
.replace('.gl_resource','')
};
gulp.task('test', function() {
return gulp.src('').pipe(shell(
['pybot -d reports tests'],
{
ignoreErrors: true,
errorMessage: 'tests failed'
}
))
});
gulp.task('watch', function () {
gulp.watch('tests/**/*.robot').on('change', function(evt) {
process.stdout.write('file changed\n');
process.stdout.write('running tests\n');
return gulp.src('').pipe(
shell(['pybot -d reports --suite ' + get_path(evt) + ' tests'],
{
ignoreErrors: true,
errorMessage: 'tests failed'
})
)
});
});
//pybot --suite tests.bugs.directory_test tests