update thrift, opencensus, others (#893)

* update thrift, opencensus, others

* stats: update to opencensus 0.6.0 view api
This commit is contained in:
Reed Allman
2018-03-26 15:43:49 -07:00
committed by GitHub
parent 0ce5c4500b
commit 8af605cf3d
1266 changed files with 122191 additions and 28775 deletions

View File

@@ -38,11 +38,14 @@ module.exports = function(grunt) {
},
shell: {
InstallThriftJS: {
command: 'mkdir test/build; mkdir test/build/js; cp src/thrift.js test/build/js/thrift.js'
command: 'mkdir test/build; mkdir test/build/js; mkdir test/build/js/lib; cp src/thrift.js test/build/js/thrift.js'
},
InstallThriftNodeJSDep: {
command: 'cd ../..; npm install'
},
InstallTestLibs: {
command: 'cd test; ant download_jslibs'
},
ThriftGen: {
command: '../../compiler/cpp/thrift -gen js -gen js:node -o test ../../test/ThriftTest.thrift'
},
@@ -51,35 +54,33 @@ module.exports = function(grunt) {
},
ThriftGenDeepConstructor: {
command: '../../compiler/cpp/thrift -gen js -o test ../../test/JsDeepConstructorTest.thrift'
}
},
external_daemon: {
},
ThriftGenDoubleConstants: {
command: '../../compiler/cpp/thrift -gen js -o test ../../test/DoubleConstantsTest.thrift'
},
ThriftGenES6: {
command: '../../compiler/cpp/thrift -gen js -gen js:es6 -o test ../../test/ThriftTest.thrift'
},
ThriftTestServer: {
options: {
startCheck: function(stdout, stderr) {
return (/Thrift Server running on port/).test(stdout);
},
nodeSpawnOptions: {
cwd: "test",
env: {NODE_PATH: "../../nodejs/lib:../../../node_modules"}
}
async: true,
execOptions: {
cwd: "./test",
env: {NODE_PATH: "../../nodejs/lib:../../../node_modules"}
}
},
cmd: "node",
args: ["server_http.js"]
command: "node server_http.js",
},
ThriftTestServer_TLS: {
options: {
startCheck: function(stdout, stderr) {
return (/Thrift Server running on port/).test(stdout);
},
nodeSpawnOptions: {
cwd: "test",
env: {NODE_PATH: "../../nodejs/lib:../../../node_modules"}
}
async: true,
execOptions: {
cwd: "./test",
env: {NODE_PATH: "../../nodejs/lib:../../../node_modules"}
}
},
cmd: "node",
args: ["server_https.js"]
}
command: "node server_https.js",
},
},
qunit: {
ThriftJS: {
@@ -96,6 +97,14 @@ module.exports = function(grunt) {
]
}
},
ThriftJS_DoubleRendering: {
options: {
'--ignore-ssl-errors': true,
urls: [
'http://localhost:8088/test-double-rendering.html'
]
}
},
ThriftWS: {
options: {
urls: [
@@ -133,6 +142,13 @@ module.exports = function(grunt) {
'http://localhost:8088/test-deep-constructor.html'
]
}
},
ThriftWSES6: {
options: {
urls: [
'http://localhost:8088/test-es6.html'
]
}
}
},
jshint: {
@@ -154,19 +170,25 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-external-daemon');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-shell-spawn');
grunt.registerTask('wait', 'Wait just one second for server to start', function () {
var done = this.async();
setTimeout(function() {
done(true);
}, 1000);
});
grunt.registerTask('test', ['jshint', 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen',
'external_daemon:ThriftTestServer', 'external_daemon:ThriftTestServer_TLS',
'shell:InstallTestLibs',
'shell:ThriftTestServer', 'shell:ThriftTestServer_TLS',
'wait',
'shell:ThriftGenDeepConstructor', 'qunit:ThriftDeepConstructor',
'qunit:ThriftJS', 'qunit:ThriftJS_TLS',
'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS'
'qunit:ThriftWS',
'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS',
'shell:ThriftGenES6', 'qunit:ThriftWSES6',
'shell:ThriftTestServer:kill', 'shell:ThriftTestServer_TLS:kill',
]);
grunt.registerTask('default', ['jshint', 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen',
'external_daemon:ThriftTestServer', 'external_daemon:ThriftTestServer_TLS',
'qunit:ThriftJS', 'qunit:ThriftJS_TLS',
'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS',
'concat', 'uglify', 'jsdoc'
]);
grunt.registerTask('default', ['test', 'concat', 'uglify', 'jsdoc']);
};