Remove some extraneous deps, use sc-forks testrpc

pull/1/head
cgewecke 8 years ago
parent f6b617ea22
commit 9d24ac7087
  1. 1
      .gitignore
  2. 18
      exec.js
  3. 2
      package.json
  4. 13
      test/run.js

1
.gitignore vendored

@ -2,3 +2,4 @@ allFiredEvents
coverage.json
coverage/
node_modules/
.changelog

@ -4,9 +4,7 @@ const shell = require('shelljs');
const fs = require('fs');
const reqCwd = require('req-cwd');
const path = require('path');
const program = require('commander');
const childprocess = require('child_process');
const SolidityCoder = require('web3/lib/solidity/coder.js');
const getInstrumentedVersion = require('./instrumentSolidity.js');
const CoverageMap = require('./coverageMap.js');
@ -27,14 +25,14 @@ const solcoverDir = 'node_modules/solcover'; // Solcover assets
let modulesDir = 'node_modules/solcover/node_modules'; // Solcover's npm assets: configurable via test
// Options
let workingDir = '.'; // Default location of contracts folder
let port = 8555; // Default port - NOT 8545 & configurable via --port
let coverageOption = '--network coverage'; // Default truffle network execution flag
let silence = ''; // Default log level: configurable by --silence
let log = console.log; // Default log level: configurable by --silence
let testrpcProcess; // ref to testrpc process we need to kill on exit
let events; // ref to string loaded from 'allFiredEvents'
let workingDir = '.'; // Default location of contracts folder
let port = 8555; // Default port - NOT 8545 & configurable via --port
let coverageOption = '--network coverage'; // Default truffle network execution flag
let silence = ''; // Default log level: configurable by --silence
let log = console.log; // Default log level: configurable by --silence
let testrpcProcess; // ref to testrpc server we need to close on exit
let events; // ref to string loaded from 'allFiredEvents'
// --------------------------------------- Script --------------------------------------------------
const config = reqCwd.silent(`${workingDir}/.solcover.js`) || {};

@ -16,7 +16,7 @@
"license": "ISC",
"dependencies": {
"commander": "^2.9.0",
"ethereumjs-testrpc": "https://github.com/cgewecke/testrpc.git#solcover",
"ethereumjs-testrpc": "https://github.com/sc-forks/testrpc.git",
"istanbul": "^0.4.5",
"mkdirp": "^0.5.1",
"req-cwd": "^1.0.1",

@ -12,7 +12,7 @@ function collectGarbage() {
if (global.gc) { global.gc(); }
}
describe('run', () => {
describe.only('run', () => {
let testrpcProcess = null;
let script = 'node ./exec.js'
let launchTestRpc = false;
@ -22,7 +22,7 @@ describe('run', () => {
dir: "./mock",
port: port,
testing: true,
silent: false,
silent: true,
norpc: true,
};
@ -45,13 +45,10 @@ describe('run', () => {
// possibly tied to the use of ethereumjs-vm in the coverage tests?
// - tests pass w/out this if we only run these test - e.g. it only fails when running the suite.
// - the first test always fails unless there is a fresh testrpc install.
// - Running this on Circle CI causes suite to crash
it('flush test suite', () => {
//if (!process.env.CI){ // <---- CI is set by default on circle
mock.install('Simple.sol', 'simple.js', config);
shell.exec(script); // <---- This fails mysteriously, but we don't test here.
collectGarbage();
//}
mock.install('Simple.sol', 'simple.js', config);
shell.exec(script); // <---- This fails mysteriously, but we don't test here.
collectGarbage();
});
// This test should be positioned first (or second if flushing) in the suite because of

Loading…
Cancel
Save