target.sample = function()

in make.js [174:200]


target.sample = function () {
    tl.pushd(buildPath);

    // 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('node sample.js', true);
    tl.popd();
}