From 83d438fe169d5056d80cb271364355fed9dff4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Tue, 18 Jul 2023 19:22:42 +0200 Subject: [PATCH] Add assertions and explicit configuration to junit test Currently the tests in the build are not executed for the junit container, the testproject is only compiled because an execution is missing. This adds the missing execution and an assertion that ensures the tests are run. --- .../junit4-in-bundle-with-dependencies/pom.xml | 9 +++++++++ .../compiler.junitcontainer/junit4-in-bundle/pom.xml | 9 +++++++++ .../tycho/test/compiler/CompilerClasspathEntryTest.java | 2 ++ 3 files changed, 20 insertions(+) diff --git a/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle-with-dependencies/pom.xml b/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle-with-dependencies/pom.xml index d390cb7ae8..b44e342820 100644 --- a/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle-with-dependencies/pom.xml +++ b/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle-with-dependencies/pom.xml @@ -32,6 +32,15 @@ 3.0.0-M5 + + + surefire-test + test + + test + + + diff --git a/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle/pom.xml b/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle/pom.xml index 5f3f725cfd..7f2c08b4a5 100644 --- a/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle/pom.xml +++ b/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle/pom.xml @@ -32,6 +32,15 @@ 3.0.0-M5 + + + surefire-test + test + + test + + + diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java index 299c594fe3..9749995764 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java @@ -33,6 +33,7 @@ public void testJUnit4Container() throws Exception { Verifier verifier = getVerifier("compiler.junitcontainer/junit4-in-bundle", true); verifier.executeGoal("test"); verifier.verifyErrorFreeLog(); + verifier.verifyTextInLog("Tests run: 5, Failures: 0, Errors: 0, Skipped: 0"); } @Test @@ -40,6 +41,7 @@ public void testJUnit4ContainerWithDependencies() throws Exception { Verifier verifier = getVerifier("compiler.junitcontainer/junit4-in-bundle-with-dependencies", true); verifier.executeGoal("test"); verifier.verifyErrorFreeLog(); + verifier.verifyTextInLog("Tests run: 5, Failures: 0, Errors: 0, Skipped: 0"); } @Test