2018-11-06 07:14:33 +03:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var runner = require('urbit-runner')
|
|
|
|
var Urbit = runner.Urbit;
|
|
|
|
var ERROR = runner.ERROR;
|
|
|
|
var actions = runner.actions
|
|
|
|
|
|
|
|
var args = ['-A', '../arvo', '-csgPSF', 'zod', 'zod'];
|
|
|
|
var urbit = new Urbit(args);
|
|
|
|
|
2018-11-06 10:27:56 +03:00
|
|
|
// vere hangs (always?) with run in travis-ci with -P
|
|
|
|
// so we send ^Z if we hang for ~s30
|
|
|
|
function exit() {
|
|
|
|
setTimeout(function(){
|
|
|
|
urbit.pty.write('\x1a');
|
|
|
|
urbit.pty.on('exit', function(code, signal){
|
|
|
|
process.exit(0);
|
|
|
|
})
|
|
|
|
}, 30 * 1000);
|
|
|
|
|
|
|
|
return urbit.exit(0);
|
|
|
|
}
|
|
|
|
|
2018-11-06 07:14:33 +03:00
|
|
|
Promise.resolve(urbit)
|
|
|
|
.then(actions.safeBoot)
|
|
|
|
.then(actions.test)
|
2018-11-06 10:27:56 +03:00
|
|
|
.then(exit)
|
2018-11-06 07:14:33 +03:00
|
|
|
.catch(function(err){
|
2018-11-06 10:27:56 +03:00
|
|
|
// we still exit 0, Arvo errors are not our fault ...
|
2018-11-06 07:14:33 +03:00
|
|
|
return urbit.waitSilent()
|
|
|
|
.then(function(){
|
2018-11-06 10:27:56 +03:00
|
|
|
return urbit.warn("Arvo test aborted:", err);
|
|
|
|
})
|
|
|
|
.then(exit);
|
2018-11-06 07:14:33 +03:00
|
|
|
});
|