Commit 1fefbbee authored by Daniel Smith's avatar Daniel Smith

Add support for patch dependencies

parent 14eaa701
This is the changelog for jom 1.1.2, the parallel make tool.
This is the changelog for jom 1.1.3, the parallel make tool.
Changes since jom 1.1.2
- Removed the /KEEPTEMPFILES option. This option only worked for top-level make
files anyway and was less useful than intended. Use the /U option to display
the content of inline files instead.
- Fixed an issue where jom.exe would try to load qt.conf from drive E.
- Fixed handling of double backslash at the end of line (QTCREATORBUG-20550).
- Fixed handling of line continuations in preprocessor directives
(QTCREATORBUG-8621, QTCREATORBUG-18001).
- Fixed the CMake project file.
Changes since jom 1.1.1
- Fixed exit code propagation in xgejom.bat and ibjom.bat (QTCREATORBUG-16619).
......
No preview for this file type
This diff is collapsed.
......@@ -456,6 +456,8 @@ function runTest(test) {
test.bad_commit,
"--knownGoodRev",
test.good_commit,
"--patches",
test.patches,
"--benchmark",
test.test_name ? test.test_name : test.custom_benchmark_file.tempFilePath.replace(re, "/"),
"--regressionTarget",
......@@ -472,6 +474,8 @@ function runTest(test) {
test.module,
"--testSingleCommit",
test.commit,
"--patches",
test.patches,
"--benchmark",
test.test_name ? test.test_name : test.custom_benchmark_file.tempFilePath.replace(re, "/"),
"--buildCores",
......@@ -488,6 +492,8 @@ function runTest(test) {
test.module,
"--testTwoCommit",
test.firstCommit + "," + test.secondCommit,
"--patches",
test.patches,
"--benchmark",
test.test_name ? test.test_name : test.custom_benchmark_file.tempFilePath.replace(re, "/"),
"--buildCores",
......@@ -736,6 +742,7 @@ function scheduleJobRequest(req, res) {
branch: req.body.branch,
module: req.body.module,
commit: req.body.commit,
patches: req.body.patches,
firstCommitBuildOnHead: req.body.firstCommitBuildOnHead,
secondCommitBuildOnHead: req.body.secondCommitBuildOnHead,
firstCommit: req.body.firstCommit,
......@@ -906,6 +913,7 @@ function queryJobs(req, res) {
branch: runningJob.branch,
module: runningJob.module,
commit: runningJob.commit,
patches: runningJob.patches,
firstCommitBuildOnHead: runningJob.firstCommitBuildOnHead,
secondCommitBuildOnHead: runningJob.secondCommitBuildOnHead,
firstCommit: runningJob.firstCommit,
......@@ -1207,6 +1215,18 @@ function homePage(req, res) {
});
}
function addJobRecursive(viewElement, joblist, index, emitter, doneSignal, callback) {
toolbox.jobFormatter(joblist[index], hosts, (job) => {
viewElement += job;
index += 1;
if (index < joblist.length)
addJobRecursive(viewElement, joblist, index, emitter, doneSignal, callback);
else
callback(viewElement);
});
}
if (isPrimaryHost && !req.query.status) {
// Serve the web page if we're the scheduler and status wasn't explicitly requested.
const readyEmitter = new events.EventEmitter();
......@@ -1328,21 +1348,14 @@ function homePage(req, res) {
if (completedJobs.length > 15)
completedJobs = completedJobs.slice(-15);
readyEmitter.on("completedJobFinished", () => {
if ((completedJobsFinishedCount += 1) == completedJobs.length) {
view.completedJobs += "</ul></br>";
readyChecklist.completedJobs = true;
readyEmitter.emit('readyCheck');
}
});
view.completedJobs = `<div style="padding-left:25px"><button onclick="window.location.href='/clearFinishedJobs'">Clean up old jobs</button></div>`;
view.completedJobs += "<ul>";
for (let i = completedJobs.length - 1; i >= 0; i--) {
toolbox.jobFormatter(completedJobs[i], hosts, (job) => {
view.completedJobs += job;
readyEmitter.emit("completedJobFinished")
});
}
addJobRecursive(view.completedJobs, completedJobs.slice().reverse(), 0, readyEmitter, "completedJobsFinished", (formatted) => {
view.completedJobs = formatted;
view.completedJobs += "</ul></br>";
readyChecklist.completedJobs = true;
readyEmitter.emit('readyCheck');
});
} else {
readyChecklist.completedJobs = true;
readyEmitter.emit('readyCheck');
......
......@@ -117,7 +117,7 @@ function jobFormatter(job, hosts, callback) {
}
if (job.status != "staged") {
view.logButton = `<br><button onclick="window.location.href='${
view.logButton = `<button onclick="window.location.href='${
job.status == "running"
? "http://" +
(hosts[hosts.findIndex((x) => x.hostname == job.test_hosts[0])]
......@@ -135,6 +135,9 @@ function jobFormatter(job, hosts, callback) {
job.status == "cancelling" ? "disabled" : ""}>Cancel</button>`;
}
if (view.timeEstimate)
view.timeEstimate = `<br>${view.timeEstimate}`
// Return a formatted HTML string of the job to insert into the page.
fetch(`http://${domain}:${webPort}/templates/job.mustache`)
.then((response) => response.text())
......
......@@ -11,8 +11,9 @@ Tested commit(s) {{commitString}}{{backendString}}
Last status message: <font color="#454545">{{statusMsg}}</font>
<br>
{{testString}}
{{timeEstimate}}
{{&timeEstimate}}
{{&result}}
<br>
{{&logButton}} {{&cancelButton}}
</li>
<br>
\ No newline at end of file
......@@ -103,6 +103,10 @@
display: inline-block;
font-size: 14px;
}
.option {
border-color: red;
}
</style>
......@@ -183,6 +187,26 @@
<label for="test_hosts">Run job on host:</label><br>
{{&hostSelectionComboBox}}
<hr style="width:20%">
<label for="patches">Additional patches needed to build selected revision:</label>
<b help="The build process cherry-picks your change to test. If the change relies on other patches to build, enter the refs here."
class="tooltip">(Help)</b>
<br>
<table>
<th>Selected patches to apply</th>
<th>Patchref</th>
<tr valign="top" height=0%>
<td rowspan=2>
<select id="patches" name="patches" size=1 style="min-width:300px;overflow:hidden" multiple>
<option id="placeholder" value="" disabled selected>No patches</option>
</select>
</td>
<td><input id="patchref" name="patchref" type="text" style="width:300px" placeholder="refs/changes/12/345678/9" onkeyup="AddPatchRef(event)"></input></td>
</tr>
<tr valign="top">
<td align="center" colspan=2 style="padding-top:5px"><button type="button"
onclick="AddPatchRef()">Add Patch</button></td>
</table>
<hr style="width:20%">
<label for="environment">Set custom environment variables on hosts:</label><br>
<table>
<th>Variables</th>
......@@ -190,8 +214,9 @@
<th>Variable Value</th>
<tr valign="top" height=0%>
<td rowspan=2>
<select id="environment" name="environment" size=2 style="min-width:100px;overflow:hidden"
multiple></select>
<select id="environment" name="environment" size=2 style="min-width:100px;overflow:hidden" multiple>
<option id="placeholder" value="" disabled selected>No variables</option>
</select>
</td>
<td><input id="environmentName" name="environmentName" type="text" style="width:200"></input></td>
<td><input id="environmentValue" name="environmentValue" type="text" style="width:200" onkeyup="AddEnvironmentVariable(event)"></input></td>
......@@ -257,6 +282,26 @@
<label for="test_hosts">Run job on host:</label><br>
{{&hostSelectionComboBox}}
<hr style="width:20%">
<label for="patches">Additional patches needed to build selected revision:</label>
<b help="The build process cherry-picks your change to test. If the change relies on other patches to build, enter the refs here."
class="tooltip">(Help)</b>
<br>
<table>
<th>Selected patches to apply</th>
<th>Patchref</th>
<tr valign="top" height=0%>
<td rowspan=2>
<select id="patches" name="patches" size=1 style="min-width:300px;overflow:hidden" multiple>
<option id="placeholder" value="" disabled selected>No patches</option>
</select>
</td>
<td><input id="patchref" name="patchref" type="text" style="width:300px" placeholder="refs/changes/12/345678/9" onkeyup="AddPatchRef(event)"></input></td>
</tr>
<tr valign="top">
<td align="center" colspan=2 style="padding-top:5px"><button type="button"
onclick="AddPatchRef()">Add Patch</button></td>
</table>
<hr style="width:20%">
<label for="environment">Set custom environment variables on hosts:</label><br>
<table>
<th>Variables</th>
......@@ -342,6 +387,26 @@
<label for="test_hosts">Run job on host:</label><br>
{{&hostSelectionComboBox}}
<hr style="width:20%">
<label for="patches">Additional patches needed to build selected revision:</label>
<b help="The build process cherry-picks your change to test. If the change relies on other patches to build, enter the refs here."
class="tooltip">(Help)</b>
<br>
<table>
<th>Selected patches to apply</th>
<th>Patchref</th>
<tr valign="top" height=0%>
<td rowspan=2>
<select id="patches" name="patches" size=1 style="min-width:300px;overflow:hidden" multiple>
<option id="placeholder" value="" disabled selected>No patches</option>
</select>
</td>
<td><input id="patchref" name="patchref" type="text" style="width:300px" placeholder="refs/changes/12/345678/9" onkeyup="AddPatchRef(event)"></input></td>
</tr>
<tr valign="top">
<td align="center" colspan=2 style="padding-top:5px"><button type="button"
onclick="AddPatchRef()">Add Patch</button></td>
</table>
<hr style="width:20%">
<label for="environment">Set custom environment variables on hosts:</label><br>
<table>
<th>Variables</th>
......@@ -473,7 +538,7 @@
enableButton();
}
function SingleCommitScheduler(){
function SingleCommitScheduler() {
if (schedulers.singleCommitScheduler.style.display === "none") {
schedulers.bisectScheduler.style.display = "none";
schedulers.singleCommitScheduler.style.display = "block";
......@@ -487,7 +552,7 @@
enableButton();
}
function TwoCommitScheduler(){
function TwoCommitScheduler() {
if (schedulers.twoCommitScheduler.style.display === "none") {
schedulers.bisectScheduler.style.display = "none";
schedulers.singleCommitScheduler.style.display = "none";
......@@ -502,7 +567,7 @@
}
// Keep the submit buttons disabled until a valid test host is selected
function enableButton(){
function enableButton() {
let e = Utils.findChildById(activeElement, "test_hosts", true)
if (e.options){
Utils.findChildById(activeElement, "submit", true).disabled = false;
......@@ -520,7 +585,7 @@
return true; //submit the form
}
function disableSecondCommit(){
function disableSecondCommit() {
let e = Utils.findChildById(activeElement, "simpleRegressionTest", true)
if (e.checked){
let secondCommit = Utils.findChildById(activeElement, "secondCommit", true);
......@@ -537,21 +602,51 @@
}
}
function AddEnvironmentVariable(event) {
function AddPatchRef(event) {
let e = Utils.findChildById(activeElement, "patches", true)
let v = Utils.findChildById(activeElement, "patchref", true)
if (event && event.keyCode && event.keyCode != 13){
v.setCustomValidity("");
v.reportValidity();
return;
} else {
if(v.value != "") {
if (/^(refs\/changes\/(\d{2,}\/\d{6})\/?(\d+)?|[0-9a-z]{40})$/.exec(v.value)) {
if (e.options[0].id == "placeholder") {
e.remove(0);
}
let option = document.createElement("option");
option.text = v.value;
option.selected = true;
e.add(option);
e.size = e.length;
v.value = "";
} else {
v.setCustomValidity("Patch ref must either be a 40-char sha1 or follow the format: 'refs/changes/nn/nnnnnn/' followed by an optional patchset number.");
v.reportValidity();
}
}
}
}
function AddEnvironmentVariable(event) {
if (event && event.keyCode && event.keyCode != 13) {
return;
} else {
let e = Utils.findChildById(activeElement, "environment", true)
let n = Utils.findChildById(activeElement, "environmentName", true)
let v = Utils.findChildById(activeElement, "environmentValue", true)
if(n.value != "" && v.value != "") {
if (e.options[0].id == "placeholder") {
e.remove(0);
}
let option = document.createElement("option");
option.text = `${n.value}=${v.value}`;
option.selected = true;
e.add(option);
e.size = e.length
n.value = ""
v.value = ""
e.size = e.length;
n.value = "";
v.value = "";
}
}
}
......
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