var runTests = function()

in make.js [128:154]


var runTests = function (testPath) {
    cp('-R', path.join(__dirname, 'test', 'data'), testPath);
    //cp('-Rf', rp('test/scripts'), testPath);

    // tool lib requires a 2.115.0 agent or higher
    process.env['AGENT_VERSION'] = '2.115.0';

    // creating a cache dir in the build dir.  agent would do this
    var cacheDir = path.join(process.cwd(), 'CACHE');
    process.env['AGENT_TOOLSDIRECTORY'] = cacheDir;
    tl.mkdirP(cacheDir);

    // redirecting TEMP (agent would do this per build)
    var tempDir = path.join(process.cwd(), 'TEMP');
    tl.mkdirP(tempDir);
    process.env['AGENT_TEMPDIRECTORY'] = tempDir;
    if (os.platform() == 'win32') {
        process.env['TEMP'] = tempDir;
        process.env['TMP'] = tempDir;
    }
    else {
        process.env['TMPDIR'] = tempDir;
        tl.mkdirP(tempDir);
    }

    run('mocha ' + testPath + ' --recursive', true);
}