Skip to content

Commit

Permalink
install test-pilot app, expose in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
noopkat committed Jan 2, 2016
1 parent efb575d commit e89e7d4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var Avrgirl = require('../avrgirl-arduino');
var boards = require('../boards');
var parseArgs = require('minimist');
var path = require('path');
var child = require('child_process');

var args = (process.argv.slice(2));
var argv = parseArgs(args, {});
Expand Down Expand Up @@ -71,6 +72,12 @@ function handleInput(action, argz) {
break;
}

case 'test-pilot': {
var tp = child.exec('node ' + path.join(__dirname, '..', 'tests', 'test-pilot.js'));
tp.stdout.pipe(process.stdout);
break;
}

default: {
// Invalid or no argument specified, show help and exit with an error status
showHelp();
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"homepage": "https://github.com/noopkat/avrgirl-arduino",
"dependencies": {
"async": "^1.4.2",
"avrga-tester": "^1.0.4",
"chip.avr.avr109": "^1.0.4",
"colors": "^1.1.2",
"graceful-fs": "^4.1.2",
Expand Down
11 changes: 11 additions & 0 deletions tests/test-pilot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var testpilot = require('avrga-tester');
var Avrgirl = require('../avrgirl-arduino');
var fs = require('fs');
var path = require('path');

fs.readFile(path.join(__dirname, '..', 'package.json'), function (err, data) {
var pjson = JSON.parse(data);
var avrgav = pjson.version;
var hexpath = path.join(__dirname, '..', 'junk', 'hex');
testpilot(Avrgirl, avrgav, hexpath);
});

0 comments on commit e89e7d4

Please sign in to comment.