Commit 86258aa6 authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

errors come before warnings in the report

parent 748e7c1c
...@@ -68,9 +68,9 @@ public class CMDConfigurations { ...@@ -68,9 +68,9 @@ public class CMDConfigurations {
.addOption(ARG_DIRECTORY, ARG_DIRECTORY_LONG, true, ARG_DIRECTORY_MAN) .addOption(ARG_DIRECTORY, ARG_DIRECTORY_LONG, true, ARG_DIRECTORY_MAN)
.addOption(ARG_REMOTE_ONLY, ARG_REMOTE_ONLY_LONG, false, ARG_REMOTE_ONLY_MAN) .addOption(ARG_REMOTE_ONLY, ARG_REMOTE_ONLY_LONG, false, ARG_REMOTE_ONLY_MAN)
.addOption(ARG_IGNORE_EXAMPLES, ARG_IGNORE_EXAMPLES_LONG, false, ARG_IGNORE_EXAMPLES_MAN) .addOption(ARG_IGNORE_EXAMPLES, ARG_IGNORE_EXAMPLES_LONG, false, ARG_IGNORE_EXAMPLES_MAN)
.addOption(ARG_IGNORE_TERMS, ARG_IGNORE_TERMS_LONG, false, ARG_IGNORE_TERMS_MAN)
.addOption(ARG_IGNORE_GIT, ARG_IGNORE_GIT_LONG, false, ARG_IGNORE_GIT_MAN) .addOption(ARG_IGNORE_GIT, ARG_IGNORE_GIT_LONG, false, ARG_IGNORE_GIT_MAN)
.addOption(ARG_NO_SITE, ARG_NO_SITE_LONG, false, ARG_NO_SITE_MAN) .addOption(ARG_NO_SITE, ARG_NO_SITE_LONG, false, ARG_NO_SITE_MAN)
.addOption(ARG_IGNORE_TERMS, ARG_IGNORE_TERMS_LONG, false, ARG_INCLUDE_MASTER_MAN)
.addOption(ARG_INCLUDE_MASTER, ARG_INCLUDE_MASTER_LONG, false, ARG_INCLUDE_MASTER_MAN) .addOption(ARG_INCLUDE_MASTER, ARG_INCLUDE_MASTER_LONG, false, ARG_INCLUDE_MASTER_MAN)
.addOption(ARG_VERBOSE, ARG_VERBOSE_LONG, false, ARG_VERBOSE_MAN); .addOption(ARG_VERBOSE, ARG_VERBOSE_LONG, false, ARG_VERBOSE_MAN);
} }
......
...@@ -119,6 +119,10 @@ public class Main { ...@@ -119,6 +119,10 @@ public class Main {
String dirName = cl.getOptionValue(ARG_DIRECTORY, ARG_DIRECTORY_DEFAULT); String dirName = cl.getOptionValue(ARG_DIRECTORY, ARG_DIRECTORY_DEFAULT);
directory = new File(dirName).getCanonicalFile(); directory = new File(dirName).getCanonicalFile();
if(!directory.isDirectory()) {
LOG.error("The directory does not exist " + directory);
System.exit(-1);
}
remoteOnly = cl.hasOption(ARG_REMOTE_ONLY); remoteOnly = cl.hasOption(ARG_REMOTE_ONLY);
ignoreGit = cl.hasOption(ARG_IGNORE_GIT); ignoreGit = cl.hasOption(ARG_IGNORE_GIT);
...@@ -170,7 +174,7 @@ public class Main { ...@@ -170,7 +174,7 @@ public class Main {
testSuites.clean(); testSuites.clean();
reportAndExit((int) -Math.signum(testSuites.getErrors())); reportAndExit((int) -Math.signum(testSuites.getErrors() + testSuites.getFailures()));
} }
private static void setLogAppenders() throws IOException { private static void setLogAppenders() throws IOException {
......
...@@ -93,13 +93,13 @@ public class TestSuites implements Serializable { ...@@ -93,13 +93,13 @@ public class TestSuites implements Serializable {
Collections.sort(ts.getTestCases(), new Comparator<TestCase>() { Collections.sort(ts.getTestCases(), new Comparator<TestCase>() {
@Override @Override
public int compare(TestCase o1, TestCase o2) { public int compare(TestCase o1, TestCase o2) {
if (o1.getStatus() == o2.getStatus()) { if (o1.getStatus().equals(o2.getStatus())) {
return 0; return 0;
} }
if (o1.getStatus() == TestCase.Status.ERROR.getName()) { if (o1.getStatus().equals(TestCase.Status.ERROR.getName())) {
return 1; return -1;
} }
if (o2.getStatus() == TestCase.Status.ERROR.getName()) { if (o2.getStatus().equals(TestCase.Status.ERROR.getName())) {
return 1; return 1;
} }
return 0; return 0;
......
...@@ -31,6 +31,7 @@ import org.semanticweb.owlapi.model.OWLOntologyManager; ...@@ -31,6 +31,7 @@ import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.profiles.OWL2DLProfile; import org.semanticweb.owlapi.profiles.OWL2DLProfile;
import org.semanticweb.owlapi.profiles.OWLProfileReport; import org.semanticweb.owlapi.profiles.OWLProfileReport;
import org.semanticweb.owlapi.profiles.OWLProfileViolation; import org.semanticweb.owlapi.profiles.OWLProfileViolation;
import org.semanticweb.owlapi.reasoner.OWLReasonerConfiguration;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -25,7 +25,7 @@ public class CheckRepositoryStructure extends JobRunner { ...@@ -25,7 +25,7 @@ public class CheckRepositoryStructure extends JobRunner {
public static final PathMatcher ttlMatcher = FileSystems.getDefault().getPathMatcher("glob:**/*.ttl"); public static final PathMatcher ttlMatcher = FileSystems.getDefault().getPathMatcher("glob:**/*.ttl");
private final Set<String> gitignoreLines = new HashSet<>( private final Set<String> gitignoreLines = new HashSet<>(
Arrays.asList("target", "*~", ".DS_Store", "catalog-v001.xml")); Arrays.asList("target", "*~", ".DS_Store", "catalog-v001.xml", "saref-pipeline.jar"));
private Version version; private Version version;
private File directory; private File directory;
......
...@@ -58,16 +58,16 @@ TEMPLATE { ...@@ -58,16 +58,16 @@ TEMPLATE {
} WHERE { BIND( fun:XPath(?testcase, "/testcase/system-out" ) AS ?output ) } . } WHERE { BIND( fun:XPath(?testcase, "/testcase/system-out" ) AS ?output ) } .
} }
</div>""" </div>"""
} ITERATOR iter:XPath( ?testsuite , "/testsuite/testcase") AS ?testcase } ITERATOR iter:XPath( ?testsuite , "/testsuite/testcase") AS ?testcase ?pos
WHERE { WHERE {
VALUES ( ?status ?class ) { VALUES ( ?status ?class ?priority ) {
("success" "alert-success") ("success" "alert-success" 1)
("warning" "alert-warning") ("warning" "alert-warning" 1)
("failure" "alert-warning") ("failure" "alert-warning" 1)
("error" "alert-danger") ("error" "alert-danger" 2 )
("unknown" "alert-dark") } ("unknown" "alert-dark" 1 ) }
FILTER( str(fun:XPath (?testcase , "/testcase/@status" )) = ?status ) FILTER( str(fun:XPath (?testcase , "/testcase/@status" )) = ?status )
} . } ORDER BY ?pos .
} "</details></div>\n" } "</details></div>\n"
} ITERATOR iter:XPath( ?testsuites , "/testsuites/testsuite") AS ?testsuite . } ITERATOR iter:XPath( ?testsuites , "/testsuites/testsuite") AS ?testsuite .
......
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