Commit ea3a4ad4 authored by Brown, Jonathan D.'s avatar Brown, Jonathan D.

Merge branch 'smoke-fixes' into 'master'

Smoke fixes

See merge request !487
parents 61916d31 56a661f2
'use strict';
const QCRunner = require('./qc-runner.js');
let baseurl,
qcRunner;
let baseurl, qcRunner;
qcRunner = QCRunner();
baseurl = process.argv[2];
......@@ -14,63 +11,114 @@ if (typeof baseurl === 'undefined') {
process.stderr.write(`No base url specified, using default ${baseurl}\n`);
}
let nshm2002Results, nshm2008Results, nshm2014Results, nshm2020Results;
Promise.all([
qcRunner.run(`${baseurl}/ws/designmaps/aashto-2009.json`,
require('./expectations/aashto-2009.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/asce7-05.json`,
// NSHM 2002
qcRunner.run(
`${baseurl}/ws/designmaps/asce7-05.json`,
require('./expectations/asce7-05.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/asce7-10.json`,
require('./expectations/asce7-10.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/asce7-16.json`,
require('./expectations/asce7-16.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/asce41-13.json`,
require('./expectations/asce41-13.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/nehrp-2009.json`,
require('./expectations/nehrp-2009.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/nehrp-2015.json`,
require('./expectations/nehrp-2015.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/nehrp-2020.json`,
require('./expectations/nehrp-2020.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/ibc-2012.json`,
require('./expectations/ibc-2012.smoketest.json'),
process.stdout),
qcRunner.run(`${baseurl}/ws/designmaps/ibc-2015.json`,
require('./expectations/ibc-2015.smoketest.json'),
process.stdout)
]).then((results) => {
let status;
status = 0;
results.forEach((result) => {
process.stdout.write(JSON.stringify(result) + '\n');
status += result.fail;
process.stdout
)
])
.then(results => {
nshm2002Results = results;
return Promise.all([
// NSHM 2008
qcRunner.run(
`${baseurl}/ws/designmaps/nehrp-2009.json`,
require('./expectations/nehrp-2009.smoketest.json'),
process.stdout
),
qcRunner.run(
`${baseurl}/ws/designmaps/asce7-10.json`,
require('./expectations/asce7-10.smoketest.json'),
process.stdout
),
qcRunner.run(
`${baseurl}/ws/designmaps/asce41-13.json`,
require('./expectations/asce41-13.smoketest.json'),
process.stdout
),
qcRunner.run(
`${baseurl}/ws/designmaps/aashto-2009.json`,
require('./expectations/aashto-2009.smoketest.json'),
process.stdout
),
qcRunner.run(
`${baseurl}/ws/designmaps/ibc-2012.json`,
require('./expectations/ibc-2012.smoketest.json'),
process.stdout
),
qcRunner.run(
`${baseurl}/ws/designmaps/ibc-2015.json`,
require('./expectations/ibc-2015.smoketest.json'),
process.stdout
)
]);
})
.then(results => {
nshm2008Results = results;
return Promise.all([
// NSHM 2014
qcRunner.run(
`${baseurl}/ws/designmaps/nehrp-2015.json`,
require('./expectations/nehrp-2015.smoketest.json'),
process.stdout
),
qcRunner.run(
`${baseurl}/ws/designmaps/asce7-16.json`,
require('./expectations/asce7-16.smoketest.json'),
process.stdout
)
]);
})
.then(results => {
nshm2014Results = results;
return Promise.all([
// NSHM 2020
qcRunner.run(
`${baseurl}/ws/designmaps/nehrp-2020.json`,
require('./expectations/nehrp-2020.smoketest.json'),
process.stdout
)
]);
})
.then(results => {
nshm2020Results = results;
return [].concat(
nshm2002Results,
nshm2008Results,
nshm2014Results,
nshm2020Results
);
})
.then(results => {
let status;
status = 0;
results.forEach(result => {
process.stdout.write(JSON.stringify(result) + '\n');
status += result.fail;
});
process.stdout.write('\n');
process.exit(status);
})
.catch(err => {
if (err.stack) {
process.stderr.write('' + err.stack);
}
process.exit(-1);
});
process.stdout.write('\n');
process.exit(status);
}).catch((err) => {
if (err.stack) {
process.stderr.write('' + err.stack);
}
process.exit(-1);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment