import "String" as String importJava "org.simantics.scl.compiler.testing.TestRunnable" where data Test @JavaName getName nameOf :: Test -> String @JavaName run runSilent :: Test -> () run :: Test -> () run test = do print "=== \(nameOf test) =======================================" runSilent test instance Show Test where show = nameOf importJava "org.simantics.scl.osgi.internal.TestUtils" where @JavaName getTests allTests :: [Test] list :: () list = iter print allTests runByName :: String -> () runByName name = for allTests (\test -> if nameOf test == name then run test else ()) runByPattern :: String -> () runByPattern patternText = do pattern = String.compile patternText for allTests (\test -> if String.matches (String.matcher pattern (nameOf test)) then run test else ()) runAll :: () runAll = for allTests run importJava "org.simantics.scl.osgi.internal.ModuleUtils" where """ Tries to compile all modules in SCLOsgi context and prints all compilation errors related to the modules. """ validateModules :: ()