This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit efce779d6dbf708dc7c9354b1bcb4a457082774b
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Fri Aug 9 10:36:35 2024 +0200

    Document better the alternative way to enable tests on PostgreSQL,
    because setting properties on the Gradle command-line is not easy.
---
 .../test/org/apache/sis/test/TestConfiguration.java    | 18 +++++++++++++++++-
 .../apache/sis/referencing/factory/sql/epsg/README.md  |  3 ++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git 
a/endorsed/src/org.apache.sis.util/test/org/apache/sis/test/TestConfiguration.java
 
b/endorsed/src/org.apache.sis.util/test/org/apache/sis/test/TestConfiguration.java
index fa56ccf190..941666aa51 100644
--- 
a/endorsed/src/org.apache.sis.util/test/org/apache/sis/test/TestConfiguration.java
+++ 
b/endorsed/src/org.apache.sis.util/test/org/apache/sis/test/TestConfiguration.java
@@ -28,7 +28,7 @@ public final class TestConfiguration extends Static {
     /**
      * Environment variable to use as a fallback if a system property is not 
set.
      * This is a comma-separated list of the following keywords, without 
spaces:
-     * {@code extensive}, {@code verbose}.
+     * {@code extensive}, {@code postgresql}, {@code widget}, {@code verbose}.
      *
      * @see TestCase#RUN_EXTENSIVE_TESTS
      * @see TestCase#VERBOSE
@@ -41,6 +41,10 @@ public final class TestConfiguration extends Static {
      * If this {@linkplain System#getProperties() system property} is set to 
{@code true},
      * then Apache SIS will run some tests which were normally skipped because 
they are slow.
      *
+     * <p>Alternatively, the extensive tests can also be enabled by setting the
+     * {@value #SIS_TEST_OPTIONS} environment variable to {@code 
"extensive"}.</p>
+     *
+     * @see #SIS_TEST_OPTIONS
      * @see TestCase#RUN_EXTENSIVE_TESTS
      */
     public static final String EXTENSIVE_TESTS_KEY = 
"org.apache.sis.test.extensive";
@@ -50,6 +54,10 @@ public final class TestConfiguration extends Static {
      * on the PostgreSQL database. If this {@linkplain System#getProperties() 
system property}
      * is set to {@code true}, then the {@code "SpatialMetadataTest"} database 
will be used.
      *
+     * <p>Alternatively, the tests on PostgreSQL can also be enabled by 
setting the
+     * {@value #SIS_TEST_OPTIONS} environment variable to {@code 
"postgresql"}.</p>
+     *
+     * @see #SIS_TEST_OPTIONS
      * @see TestCase#USE_POSTGRESQL
      * @see org.apache.sis.metadata.sql.TestDatabase
      */
@@ -60,6 +68,10 @@ public final class TestConfiguration extends Static {
      * If this {@linkplain System#getProperties() system property} is set to 
{@code true},
      * then the content sent to the {@link TestCase#out} field will be printed 
after each test.
      *
+     * <p>Alternatively, the verbose outputs can also be enabled by setting the
+     * {@value #SIS_TEST_OPTIONS} environment variable to {@code 
"verbose"}.</p>
+     *
+     * @see #SIS_TEST_OPTIONS
      * @see TestCase#VERBOSE
      */
     public static final String VERBOSE_OUTPUT_KEY = 
"org.apache.sis.test.verbose";
@@ -68,6 +80,10 @@ public final class TestConfiguration extends Static {
      * The {@systemProperty org.apache.sis.test.gui.show} system property
      * for enabling display of test images or widgets.
      *
+     * <p>Alternatively, the widgets display can also be enabled by setting the
+     * {@value #SIS_TEST_OPTIONS} environment variable to {@code "widget"}.</p>
+     *
+     * @see #SIS_TEST_OPTIONS
      * @see TestCase#SHOW_WIDGET
      */
     public static final String SHOW_WIDGET_KEY = 
"org.apache.sis.test.gui.show";
diff --git 
a/optional/src/org.apache.sis.referencing.epsg/test/org/apache/sis/referencing/factory/sql/epsg/README.md
 
b/optional/src/org.apache.sis.referencing.epsg/test/org/apache/sis/referencing/factory/sql/epsg/README.md
index 42f030d594..017ec271ba 100644
--- 
a/optional/src/org.apache.sis.referencing.epsg/test/org/apache/sis/referencing/factory/sql/epsg/README.md
+++ 
b/optional/src/org.apache.sis.referencing.epsg/test/org/apache/sis/referencing/factory/sql/epsg/README.md
@@ -112,7 +112,8 @@ Then the whole Apache SIS project should be [tested 
extensively](https://sis.apa
 preferably with a PostgreSQL server ready to accept local connections to 
`SpatialMetadataTest` database:
 
 ```
-mvn install -Dorg.apache.sis.test.extensive=true
+EXPORT SIS_TEST_OPTIONS=extensive,postgresql
+gradle test
 ```
 
 Regenerate the HTML pages listing available CRS and coordinate operation 
methods.

Reply via email to