From: Tuukka Lehtonen Date: Tue, 7 May 2019 12:27:35 +0000 (+0300) Subject: Export all platform SCL documentation into HTML during test build X-Git-Tag: v1.43.0~136^2~157 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=887c3c2fc31f3a4fe806c0f59c7b16ba87021636;ds=sidebyside Export all platform SCL documentation into HTML during test build org.simantics.scl.osgi.tests contains TestSCLOsgi which is now rigged to export the HTML documentation at org.simantics.scl.osgi.tests/scldoc which can then be published on the web by the CI system. gitlab #293 Change-Id: I33311078d51d5da41d3afe07b53b63746c7938ec --- diff --git a/tests/org.simantics.scl.osgi.tests/src/org/simantics/scl/osgi/tests/TestSCLOsgi.java b/tests/org.simantics.scl.osgi.tests/src/org/simantics/scl/osgi/tests/TestSCLOsgi.java index 8daf95832..227381147 100644 --- a/tests/org.simantics.scl.osgi.tests/src/org/simantics/scl/osgi/tests/TestSCLOsgi.java +++ b/tests/org.simantics.scl.osgi.tests/src/org/simantics/scl/osgi/tests/TestSCLOsgi.java @@ -1,5 +1,10 @@ package org.simantics.scl.osgi.tests; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.junit.AfterClass; @@ -12,6 +17,7 @@ import org.simantics.application.arguments.Arguments; import org.simantics.application.arguments.IArgumentFactory; import org.simantics.application.arguments.IArguments; import org.simantics.application.arguments.SimanticsArguments; +import org.simantics.scl.compiler.markdown.html.GenerateAllHtmlDocumentation; import org.simantics.scl.osgi.SCLOsgi; public class TestSCLOsgi { @@ -43,4 +49,12 @@ public class TestSCLOsgi { Assert.fail(possibleError); } } + + @Test + public void exportAllSCLDocumentation() throws IOException { + // "./scldoc" evaluates to "tests/org.simantics.scl.osgi.tests/scldoc" when these tests are ran with Tycho/Maven + Path dir = Paths.get("./scldoc"); + Files.createDirectories(dir); + GenerateAllHtmlDocumentation.generate(SCLOsgi.MODULE_REPOSITORY, dir); + } }