File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
tools/osgeo-postgis-jdbc-test-util/src/main/scripts Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # The following sets variables based in command arguments
4+ TEST_JAR=" ${1} " # This should be the postgis-jdbc jar file to be tested.
5+ DB_HOSTNAME_AND_PORT=${2} # This should be the hostname:port of the database
6+ DB_USERNAME=${3} # This should be the database user to login as.
7+ DB_PASSWORD=${4} # This should be the database password to be used during login.
8+
9+ # The following can be changed to point to the jar containing the test utility. By default it
10+ # points to a jar file in a local maven repository.
11+ MVN_REPO_LOCATION=~ /.m2/repository
12+ GROUP_ID_DIR=/net/postgis
13+ TEST_UTIL_JAR=${MVN_REPO_LOCATION}${GROUP_ID_DIR} /osgeo-postgis-jdbc-test-util/0.0.1-SNAPSHOT/osgeo-postgis-jdbc-test-util-0.0.1-SNAPSHOT.jar
14+
15+ # The following variables are derived from the variables above.
16+ # They are used to invoke the JVM with the test utility.
17+ JDBC_URL=" jdbc:postgresql://${DB_HOSTNAME_AND_PORT} /postgis1"
18+ JDBC_USERNAME=${DB_USERNAME}
19+ JDBC_PASSWORD=${DB_PASSWORD}
20+
21+ # The exactly commandline used to invoke the utility is output before it is actually invoked.
22+ echo " ==> java -classpath ${TEST_JAR} :${TEST_UTIL_JAR} net.postgis.osgeo.util.Main ${JDBC_URL} ${JDBC_USERNAME} ${JDBC_PASSWORD} "
23+
24+ java -classpath ${TEST_JAR} :${TEST_UTIL_JAR} net.postgis.osgeo.util.Main ${JDBC_URL} ${JDBC_USERNAME} ${JDBC_PASSWORD}
You can’t perform that action at this time.
0 commit comments