summaryrefslogtreecommitdiffstats
path: root/sdc-distribution-ci/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-distribution-ci/src/main/java/org')
-rw-r--r--sdc-distribution-ci/src/main/java/org/openecomp/test/CsarToscaTester.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/sdc-distribution-ci/src/main/java/org/openecomp/test/CsarToscaTester.java b/sdc-distribution-ci/src/main/java/org/openecomp/test/CsarToscaTester.java
new file mode 100644
index 0000000..4dae5eb
--- /dev/null
+++ b/sdc-distribution-ci/src/main/java/org/openecomp/test/CsarToscaTester.java
@@ -0,0 +1,18 @@
+package org.openecomp.test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory;
+import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector;
+
+public class CsarToscaTester {
+ public static void main(String[] args) throws Exception {
+ ClassLoader loader = CsarToscaTester.class.getClassLoader();
+ System.out.println("CsarToscaParser - path to CSAR is "+Arrays.toString(args));
+ SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance();
+ factory.getSdcCsarHelper(args[0]);
+ ArrayList<String> exceptionReport = ExceptionCollector.getExceptionReport();
+ System.out.println("Errors during CSAR parsing are: "+(exceptionReport != null ? exceptionReport.toString() : "none"));
+ }
+}