-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
55 lines (49 loc) · 1.68 KB
/
Gruntfile.js
File metadata and controls
55 lines (49 loc) · 1.68 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module.exports = function(grunt){
var path = require('path');
var builder = require('./build/badge_generator')
grunt.initConfig({
shell :{
test : {
command:path.join("node_modules",".bin","istanbul.cmd") +" cover " + path.join("node_modules", "mocha", "bin", "_mocha") +" -- -R mocha-unfunk-reporter",
options: {
stdout: true
}
},
"test-cov" :{
command: path.join("node_modules",".bin","istanbul") +" cover " + path.join("node_modules", "mocha", "bin", "_mocha") + " --dir " + path.join("frontend", "test_results", "coverage") + " -- -R json-cov > " +path.join("frontend", "test_results", "results.json"),
options: {
stdout: true,
callback : builder.consolidateCoverageResults
}
},
ctest :{
command:"ctest -D Experimental",
options: {
stdout: true
}
}
},
clean: {
test: ["frontend/test_results/results.json"]
},
mkdir : {
test : {
options: {
create: ['frontend/test_results']
}
}
},
env : {
mochaPlain : {
'mocha-unfunk-style' : "plain"
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-mkdir');
grunt.loadNpmTasks('grunt-env');
grunt.registerTask('test', ['shell:test']);//Test
grunt.registerTask('istanbul', ["clean:test", "mkdir:test", 'shell:test-cov']);//Test Coverage results
grunt.registerTask('ctest', ['env:mochaPlain', 'shell:ctest']);//Pushes Test results to CDASH
};