diff --git a/DEVELOPING_OPAL/validate/src/it/resources/hermes-test-fixtures.json b/DEVELOPING_OPAL/validate/src/it/resources/hermes-test-fixtures.json deleted file mode 100644 index a154bbb578..0000000000 --- a/DEVELOPING_OPAL/validate/src/it/resources/hermes-test-fixtures.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "org": { - "opalj": { - "hermes": { - "projects": [ - { - "id" : "JVM Features", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/jvm_features-1.8-g-parameters-genericsignature.jar", - "libcp_defaults" : "RTJar" - }, - { - "id": "ai", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/ai.jar", - "libcp_defaults" : "JRE" - }, - { - "id": "arrays", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/arrays.jar" - }, - { - "id": "bugs", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/bugs.jar", - "libcp_defaults" : "RTJar" - }, - { - "id": "classhierarchy", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/classhierarchy.jar" - }, - { - "id": "code", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/code.jar" - }, - { - "id": "constants", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/constants.jar" - }, - { - "id": "controlflow", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/controlflow.jar" - }, - { - "id": "cornercases", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/cornercases.jar" - }, - { - "id": "dependencies", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/dependencies-1.8-g-parameters-genericsignature-preserveAllLocals.jar" - }, - { - "id": "deprecated", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/deprecated.jar" - }, - { - "id": "equals_hashcode", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/equals_hashcode.jar" - }, - { - "id": "fields-g-8", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/fields-g-8-parameters-genericsignature.jar" - }, - { - "id": "fields-g=none", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/fields-g=none-5.jar" - }, - { - "id": "generictypes", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/generictypes.jar" - }, - { - "id": "immutability", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/immutability.jar" - }, - { - "id": "immutable", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/immutable.jar" - }, - { - "id": "innerclasses", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/innerclasses-1.8-g-parameters-genericsignature.jar" - }, - { - "id": "java8methodresolution", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/java8methodresolution.jar" - }, - { - "id": "jsr_ret", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/jsr_ret-1.3-g-preserveAllLocals-nowarn.jar" - }, - { - "id": "lambdas", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/lambdas-1.8-g-parameters-genericsignature.jar" - }, - { - "id": "methods_types", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/method_types.jar" - }, - { - "id": "methods", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/methods.jar" - }, - { - "id": "metrics", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/metrics.jar" - }, - { - "id": "polymorphism", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/polymorphism.jar" - }, - { - "id": "proxy", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/proxy.jar" - }, - { - "id": "pureness", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/pureness.jar" - }, - { - "id": "signatures", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/signatures.jar" - }, - { - "id": "tactest", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/tactest-8-preserveAllLocals.jar" - }, - { - "id": "type_annotations", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/type_annotations.jar" - }, - { - "id": "types", - "cp": "OPAL/bi/target/scala-3.7.3/resource_managed/test/types.jar" - } - ] - } - } - } -} diff --git a/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/InvokedynamicRewritingExecutionTest.scala b/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/InvokedynamicRewritingExecutionTest.scala index a388788fde..6aea75d9af 100644 --- a/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/InvokedynamicRewritingExecutionTest.scala +++ b/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/InvokedynamicRewritingExecutionTest.scala @@ -7,7 +7,6 @@ import java.io.File import java.io.PrintStream import java.net.URL import java.net.URLClassLoader -import java.nio.file.Files import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers @@ -22,7 +21,6 @@ import org.opalj.bi.isCurrentJREAtLeastJava16 import org.opalj.br.analyses.Project import org.opalj.br.reader.InvokedynamicRewriting import org.opalj.bytecode.JavaBase -import org.opalj.io.JARsFileFilter import org.opalj.util.InMemoryClassLoader /** @@ -361,50 +359,4 @@ class InvokedynamicRewritingExecutionTest extends AnyFunSpec with Matchers { } } } - - describe("behavior of rewritten OPAL") { - - it("should execute Hermes successfully") { - val resources = locateTestResources("classfiles/OPAL-MultiJar-SNAPSHOT-01-04-2018.jar", "bi") - val p = JavaFixtureProject(resources) - val opalDependencies = - locateTestResources("classfiles/OPAL-MultiJar-SNAPSHOT-01-04-2018-dependencies/", "bi") - .listFiles(JARsFileFilter).map(_.toURI.toURL) - - // Otherwise, the hermes resources are not included and hermes won't find - // HermesCLI.txt for example - val paths = Array( - new File("DEVELOPING_OPAL/tools/src/main/resources/").toURI.toURL, - new File("OPAL/ai/src/main/resources/").toURI.toURL, - new File("OPAL/ba/src/main/resources/").toURI.toURL, - new File("OPAL/bi/src/main/resources/").toURI.toURL, - new File("OPAL/br/src/main/resources/").toURI.toURL, - new File("OPAL/common/src/main/resources/").toURI.toURL - ) ++ opalDependencies - val resourceClassloader = new URLClassLoader(paths, this.getClass.getClassLoader) - val inMemoryClassLoader = new ProjectBasedInMemoryClassLoader(p, resourceClassloader) - - val c = inMemoryClassLoader.loadClass("org.opalj.hermes.HermesCLI") - val m = c.getMethod("main", classOf[Array[String]]) - - val tempFile = Files.createTempFile("OPALValidate-Hermes-stats-", ".csv").toFile - tempFile.delete() - - info("Starting Hermes...") - m.invoke( - null, - Array( - "-config", - "DEVELOPING_OPAL/validate/src/it/resources/hermes-test-fixtures.json", - "-statistics", - tempFile.getAbsolutePath - ) - ) - - assert(tempFile.exists()) - assert(tempFile.length() > 0) - - resourceClassloader.close() - } - } }