Since -Dnative is meant to be used only for integration testing and is
used in a separate step in CI to only test native compilation, would it
be OK to skip unit tests when active?
One can achieve this with something like:
diff --git a/integration-tests/artemis-core/pom.xml
b/integration-tests/artemis-core/pom.xml
index 23ead6449e..c184584026 100644
--- a/integration-tests/artemis-core/pom.xml
+++ b/integration-tests/artemis-core/pom.xml
@@ -112,6 +112,13 @@
</activation>
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
Regards,
Foivos
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/b04c930b-7d99-be8e-2db1-2540420b64ec%40redhat.com.
I don't know.Frankly, when running the native tests, I'm usually happy the other tests run before that so I don't waste my time on native compilation if a test fails in JVM mode.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo8TRKaVWE5YnzhU72BBwROe5ZWTb-%2BOhJv%3D6GMLu52ECA%40mail.gmail.com.
I see.
How about something like -Dskip.native.surefire and
diff --git a/integration-tests/artemis-core/pom.xml
b/integration-tests/artemis-core/pom.xml
index 23ead6449e..c184584026 100644
--- a/integration-tests/artemis-core/pom.xml
+++ b/integration-tests/artemis-core/pom.xml
@@ -112,6 +112,13 @@
</activation>
<build>
<plugins>
+ <plugin>
+
<groupId>org.apache.maven.plugins</groupId>
+
<artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>${skip.native.surefire}</skipTests>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
You mean in combination with -Dnative. Right?
Yes, it wouldn't unless we add something like:
<properties>
<skip.native.surefire>${skipTests}</skip.native.surefire>
</properties>
Yes. Sorry, it was not obvious from the diff.
What I am proposing targets only the native-image profile in the
integration-tests directory/module.
To achieve it I think I need to add:
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-%3DEY1uL_VWYx45odJMhcsumx2XCFKGusgSU16ZhoQ-RPw%40mail.gmail.com.
Let me give some examples for clarity:
1. `mvn -Dskip.native.surefire verify` runs both unit tests and
integration tests (no native tests here), it's essentially the
same with `mvn verify`.
2. `mvn -DskipTests verify` runs neither the unit tests nor the integration tests (no native tests here)
3. `mvn -DskipITs verify` runs unit tests but not integration tests (no native tests here)
4. `mvn -Dnative verify` runs the unit tests (jvm-mode) and the
integration tests in native mode
6. `mvn -Dnative -DskipITs verify` runs the unit tests (jvm-mode)
but not the integration tests (still builds the native image for
each integration test)
7. `mvn -Dnative -Dskip.native.surefire verify` runs only the
integration tests in native mode
Foivos
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/828aaaf2-a4a1-2c52-dd23-9ffc2d7f30c5%40redhat.com.