Bug 7397 - yang-system-test could fail if zero yang files were found 98/51298/3
authorPeter Kajsa <pkajsa@cisco.com>
Wed, 1 Feb 2017 13:00:02 +0000 (14:00 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 23 Feb 2017 08:53:14 +0000 (08:53 +0000)
Yang-system-test fails with non-zero exit code, if zero yang files
were found.

Change-Id: Id9f1b08e2e937d009a029202df1591b93a1510f1
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
yang/yang-system-test/src/main/java/org/opendaylight/yangtools/yang/parser/system/test/SystemTestUtils.java

index e35a6e899baee300615c319def7769a59b228fb0..a3d3d656041cddeafc28736306f30f1b42829a93 100644 (file)
@@ -68,6 +68,7 @@ class SystemTestUtils {
 
     static SchemaContext parseYangSources(final StatementStreamSource[] testSources,
             final StatementStreamSource[] libSources, final Set<QName> supportedFeatures) throws ReactorException {
+        Preconditions.checkArgument(testSources != null && testSources.length > 0, "No yang sources");
 
         final CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR
                 .newBuild(supportedFeatures);