summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2013-11-08 11:41:42 -0500
committerAbhishek Koneru <akoneru@redhat.com>2013-11-10 15:15:56 -0500
commitabd6142c740225d0e7632111fdc19317710a5701 (patch)
tree0bf231a08ba3fc158eac85414b4929c3a31aa778 /scripts
parent8025dfe3b644f9897ca9ecd8f7596513d9b356cf (diff)
downloadpki-abd6142c740225d0e7632111fdc19317710a5701.tar.gz
pki-abd6142c740225d0e7632111fdc19317710a5701.tar.xz
pki-abd6142c740225d0e7632111fdc19317710a5701.zip
Provide build scripts for the Java test classes.
Added the scripts to compile the java test sources when trying to build a beaker test rpm. This is required in a CI setup as the source is freshly checked out and the build is automated. Tickets 725, 785
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/compose_pki_test_package26
1 files changed, 25 insertions, 1 deletions
diff --git a/scripts/compose_pki_test_package b/scripts/compose_pki_test_package
index 075495489..eca169f6b 100755
--- a/scripts/compose_pki_test_package
+++ b/scripts/compose_pki_test_package
@@ -61,7 +61,31 @@ cd $BUILD_DIR
cp -r "$PKI_SOURCE_DIR/tests" .
-cd tests/dogtag
+### Compile the java test source ###
+
+if [ ! -d "$PKI_SOURCE_DIR/build/classes" ] ; then
+
+ echo "\nThe java tests cannot be compiled since the pki source is not compiled/built.\n"
+ echo "The core sources can be compiled either by eclipse or using the compose scripts.\n"
+ echo "Cannot build the test RPM."
+
+ exit -1
+
+fi
+
+cd tests/dogtag/dev_java_tests
+
+rm -rf bin
+
+mkdir bin
+
+CLASSPATH=$PKI_SOURCE_DIR/build/classes:/usr/share/java/junit4.jar:`pwd`/src:/usr/lib64/jss/jss4.jar:/usr/share/java/httpcomponents/httpclient.jar:/usr/share/java/httpcomponents/httpcore.jar:/usr/share/java/resteasy/jaxrs-api.jar:/usr/share/java/resteasy/resteasy-atom-provider.jar:/usr/share/java/resteasy/resteasy-jaxb-provider.jar:/usr/share/java/resteasy/resteasy-jaxrs.jar:/usr/share/java/resteasy/resteasy-jaxrs-jandex.jar:/usr/share/java/resteasy/resteasy-jettison-provider.jar:/usr/share/java/apache-commons-cli.jar:/usr/share/java/apache-commons-codec.jar:/usr/share/java/apache-commons-logging.jar:/usr/share/java/commons-codec.jar:/usr/share/java/commons-httpclient.jar:/usr/share/java/idm-console-base-1.1.7.jar:/usr/share/java/idm-console-mcc.jar:/usr/share/java/idm-console-nmclf.jar:/usr/share/java/jakarta-commons-httpclient.jar:/usr/share/java/jaxb-api.jar:/usr/share/java/ldapjdk.jar:/usr/share/java/apache-commons-lang.jar:/usr/share/java/istack-commons-runtime.jar:/usr/share/java/scannotation.jar:/usr/share/java/servlet.jar:/usr/share/java/velocity.jar:/usr/share/java/xerces-j2.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/tomcat/catalina.jar:/usr/share/java/tomcat/tomcat-util.jar:/usr/share/java/commons-io.jar
+
+javac -classpath $CLASSPATH -d bin src/*java
+
+### Building the test rm
+
+cd ..
### Passing the keyword for personalizing and an option
### to maintain a seperate folder for each beaker job (Optional)