Commit c8c2822e authored by Daniel Smith's avatar Daniel Smith

Make Bisect regression percentage required

parent 6ca96085
......@@ -85,6 +85,8 @@ if (process.argv[2] == 'standalone'){ // Startup in standalone mode
console.log(`Got slave ${index - 2}: ${val}`);
}
});
}else if (process.argv[2] == 'refreshrepos'){ // Startup with a local worker
gatherTestNames(true, function(){process.exit(0);});
} else if (process.argv[2] != undefined){ // Assume all our arguments are slave worker IPs.
isPrimaryHost = true;
......@@ -1127,7 +1129,7 @@ function schedulerPage(req, res) {
<input id='benchmarkButtonBisect' type='button' value='Upload custom benchmark' /><br>
<hr style="width:20%">
<label for="expected_regression">Expected regression, in percentage: </label>
<input id="expected_regression" type="number" min="2" max="100" style="width:40;" name="expected_regression" value="" placeholder="20">%<br>
<input id="expected_regression" type="number" min="2" max="100" style="width:40;" name="expected_regression" value="" placeholder="20" required>%<br>
<p><b>Note:</b> Be conservative with the regression target.<br>It is not recommended to search for regressions below 5% due to test noise.</p>
<hr style="width:20%">
<label for="test_hosts">Run job on host:</label><br>
......@@ -1992,12 +1994,12 @@ if (!fs.existsSync(pathmodule.join(os.homedir(), 'QMLBenchRegressionLogs', mynam
fs.mkdirSync(pathmodule.join(os.homedir(), 'QMLBenchRegressionLogs', myname, 'results'));
}
function gatherTestNames(forceUpdate){
function gatherTestNames(forceUpdate, callback){
// Gather test names for partial match suggestions on the scheduler page. If QMLBench isn't already initialized, do it now and block the scheduler.
function loadTests(){
var walk = require('walk');
testNames.length = 0;
// Walker options
var walker = walk.walk('./QtBuild/qmlbench/benchmarks/', { followLinks: false });
......@@ -2012,6 +2014,9 @@ function gatherTestNames(forceUpdate){
walker.on('end', function() {
console.log(`Loaded ${testNames.length} tests from QMLBench.`);
if(callback){
callback();
}
});
}
......@@ -2037,6 +2042,14 @@ function gatherTestNames(forceUpdate){
var pythonexe = os.platform() == 'win32' ? 'python' : 'python3'; // Python3 for windows will simply be 'python'.
const testProcess = spawn(pythonexe, ['regressionFinder.py', '--setupEnv'], os.platform() == 'win32' ? {detached: false} : {detached: true});
runningJob.processHandle = testProcess;
testProcess.stdout.on('data', (data) => {
console.log(data.toString('utf8'));
});
testProcess.stderr.on('data', (data) => {
console.log(data.toString('utf8'));
});
testProcess.on('close', code => {
console.log('Finished setting up the repositories. Ready to accept new jobs.');
runningJob = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment