collectTest = function(filePath) {
    var found = filePath.match(/^(.*)\.json$/);
    if (found === null) {
      return;
    }
    var info = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
    info.baseName = found[1];
    info.baseDir = path.dirname(filePath);
    tests.push(info);
  }
Adds a new test case if it finds a testcase declaration.
@param {string} filePath is the path to a candidate file.