To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit ecf8f973 authored by Reto Da Forno's avatar Reto Da Forno

links adjusted and addtest now also fails if validator script returns != zero

parent 84babbe9
......@@ -87,7 +87,7 @@ if (!empty($errors)) {
<legend>Upload XML test configuration</legend>
<span class="formfield">XML File:*</span><input type="file" name="xmlfile" id="xmlfile" size="27" class="required"><br />
<p>A template XML test configuration can be downloaded <a href="xml/flocklab_template.xml" target="_blank">here</a>, the XML schema file against which is validated can be found <a href="xml/flocklab.xsd" target="_blank">here</a>.<br>
Detailed information is available on the <a href="https://www.flocklab.ethz.ch/wiki/wiki/Public/Man/XmlConfig">FlockLab XML Test Configuration File Help page</a>.</p>
Detailed information is available on the <a href="https://gitlab.ethz.ch/tec/public/flocklab/wikis/Man/XmlConfig">FlockLab XML Test Configuration File Help page</a>.</p>
</fieldset>
<p></p>
<input type="hidden" name="first" value="no">
......
......@@ -27,13 +27,16 @@
}
elseif (!(in_array($xmlfile["type"], array("text/xml", "application/xml")))) {
// The uploaded file is not XML:
array_push($errors, "Uploaded file is not XML.");
array_push($errors, "Uploaded file is not XML.");
} else {
$cmd = "python ".$CONFIG['tests']['testmanagementfolder']."testconfig_validator.py -x " . $xmlfile['tmp_name'] . " -s ".$CONFIG['xml']['schemapath']." -u " . $_SESSION['serv_users_key'];
exec($cmd , $output, $ret);
foreach ($output as $error) {
array_push($errors, $error);
}
if (empty($errors) && $ret) {
array_push($errors, "unknown error");
}
}
}
......@@ -81,7 +84,7 @@
<legend>Upload XML to validate</legend>
<span class="formfield">XML File:*</span><input type="file" name="xmlfile" id="xmlfile" size="27" class="required"><br />
<p>A template XML test configuration can be downloaded <a href="xml/flocklab_template.xml" target="_blank">here</a>, the XML schema file against which is validated can be found <a href="xml/flocklab.xsd" target="_blank">here</a>.<br>
Detailed information is available on the <a href="https://www.flocklab.ethz.ch/wiki/wiki/Public/Man/XmlConfig">FlockLab XML Test Configuration File Help page</a>.</p>
Detailed information is available on the <a href="https://gitlab.ethz.ch/tec/public/flocklab/wikis/Man/XmlConfig">FlockLab XML Test Configuration File Help page</a>.</p>
</fieldset>
<p></p>
<input type="hidden" name="first" value="no">
......
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