Commits

Lars J. Nilsson committed c0ee1b4

fixing assembly and integration tests

Comments (0)

Files changed (8)

firebase-tests/systest/blackbox/README

 FIREBASE SYSTESTS
 =================
+
+Welcome to the Firebase integrations tests. 
+
+
+RUNNING VIA ANT
+===============
+The ant script only works on *nix hosts. You need the following
+prerequisites to run it successfully:
+
+ * MAVEN_HOME must be set, eg "export MAVEN_HOME=/usr/local/mvn"
+ * The ZIP release you want to test must be build locally
+
+Configuration:
+
+ * To test EE (as opposed to CE): -Dtype=EE
+ * To test a specific version, eg 1.9.5: -Dversion=1.9.5
+
+The following ant targets are useful to know:
+
+ * 'ant' - start Firebase and runs all tests 
+
+
+RUNNING FROM IDE / MAVEN
+========================
 These tests can be run via Maven or via your favorite IDE as long
 as it supports TestNG. 
 
+Prerequisites:
+
+ * You need a Firebase running with these modules deployed...
+
+ ** ../game
+ ** ../service
+ ** ../service-proxy 
+ ** ../tournament
+
+ * ... and also the configuration found in "src/test/resources"
+
 These are some helpful parameters:
 
   "clientHost" - Client host to connect to, defaults to "localhost"
 
   firebase.systest.handshakeSignature
   
-
-
-  

firebase-tests/systest/blackbox/build.xml

   only on Unix-flavor machines, sorry about that. Here, have some hints:
    
    * You need a distribution ZIP of the Firebase version you want to test installed, like so: "mvn clean package assembly:attached install"
+
+   * You need $MAVEN_HOME set in your environment, eg "export MAVEN=HOME=/usr/local/apa"
    
-   * To specify which version of Firebase to use, the system property is "version", it defaults to 1.8-CE-SNAPSHOT
+   * To specify which version of Firebase to use, the system property is "version", eg -Dverion=1.9.5
+
+   * By default this script runs CE installations, if you want to test an EE zip use a "type" property, like so: "-Dtype=EE"
    
    * You may want to run a "mvn clean install" before this script as "clean" is *not* done automatically
   
 	<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath"/>
 
 	<!-- Setup properties -->
-	<property name="version" value="1.9-CE-SNAPSHOT"/>
+	<property environment="env"/>
+	<property name="version" value="1.9.5"/>
+	<property name="type" value="CE"/>
 	<property name="build-dir" value="target/firebase-run/${version}"/>
-	<property name="run-dir" value="${build-dir}/firebase-${version}"/>
-	<property name="archive" value="firebase-${version}-release.zip"/>
+	<property name="run-dir" value="${build-dir}/firebase-${version}-${type}"/>
+	<property name="archive" value="firebase-${version}-${type}-release.zip"/>
 	<property name="path" value="com/cubeia/firebase/firebase/${version}/${archive}"/>
 	<!-- property name="dist" value="http://m2.cubeia.com/nexus/content/groups/internal-development/${path}" / -->
 	<property name="repo" value="${user.home}/.m2/repository"/>
 		<delete dir="${build-dir}"/>
 	</target>
 
+	<target name="init">
+		<fail message="Environment property $MAVEN_HOME must be set!"> 
+			<condition>
+				<and>
+					<equals arg1="${env.MAVEN_HOME}" arg2="" />
+				</and>
+			</condition>
+		</fail>
+	</target>
+
 	<!-- Setup installation and configure Firebase -->
-	<target name="prepare-firebase">
+	<target name="prepare-firebase" depends="init">
 		<!-- Temporary properties -->
 		<property name="deploy-dir" value="${run-dir}/game/deploy"/>
 		<mkdir dir="${build-dir}"/>
 				</filterset>
 			</copy>
 			<!-- Run "mvn compile test" -->
-			<artifact:mvn failonerror="false" resultproperty="mvn-result">
+			<artifact:mvn failonerror="false" resultproperty="mvn-result" mavenHome="${env.MAVEN_HOME}" fork="true">
 				<arg value="compile"/>
 				<arg value="test"/>
 			</artifact:mvn>
 	</macrodef>
 
 	<!-- Run Styx tests, only if "is-failed" is not set -->
-	<target name="run-styx-test" unless="is-failed">
+	<target name="run-styx-test" unless="is-failed" depends="init">
 		<run-test-def transport="SOCKET" port="4123"/>
 	</target>
 
 	<!-- Run Comet tests, only if "is-failed" is not set -->
-	<target name="run-comet-test" unless="is-failed">
+	<target name="run-comet-test" unless="is-failed" depends="init">
 		<run-test-def transport="COMETD" port="8123"/>
 	</target>
 
 	<!-- Run WS tests, only if "is-failed" is not set -->
-	<target name="run-ws-test" unless="is-failed">
+	<target name="run-ws-test" unless="is-failed" depends="init">
 		<run-test-def transport="WEB_SOCKET" port="8123"/>
 	</target>
 
 	<!-- Run all 3 transport type tests -->
-	<target name="run-all-tests" depends="run-styx-test,run-ws-test"/>
+	<target name="run-all-tests" depends="init,run-styx-test,run-ws-test"/>
 
 	<!-- Setup, start Firebase, run all tests, cleanup and check result -->
-	<target name="do-integration-tests" depends="start-firebase,run-all-tests,stop-firebase,cleanup,check-failed"/>
+	<target name="do-integration-tests" depends="init,start-firebase,run-all-tests,stop-firebase,cleanup,check-failed"/>
 
 	<!-- If "is-failed" is set, fail the build -->
 	<target name="check-failed" if="is-failed">

firebase-tests/systest/blackbox/pom.xml

 	<parent>
 		<groupId>com.cubeia.firebase.test</groupId>
 		<artifactId>systest</artifactId>
-		<version>1.9-CE-SNAPSHOT</version>
+		<version>1.9.5</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 	
 				<configuration>
 					<finalName>${assemblyName}</finalName>
 					<appendAssemblyId>true</appendAssemblyId>
-
 					<descriptors>
 						<descriptor>${assembly}</descriptor>
+						<descriptor>${src-assembly}</descriptor>
 					</descriptors>
-					<descriptorRefs>
+					<!-- descriptorRefs>
 						<descriptorRef>project</descriptorRef>
-					</descriptorRefs>
+					</descriptorRefs -->
 				</configuration>
 			</plugin>
 			<plugin>
                     <groupId>com.cubeia.firebase.service.conn</groupId>
                     <artifactId>conn-jgroups</artifactId>
                     <version>${project.version}</version>
-                    <type>firebase-sar</type>
+                    <type>sar</type>
+		    <scope>provided</scope>
                 </dependency>
                 
                 <dependency>
                     <groupId>com.cubeia.firebase.service.systemstate</groupId>
                     <artifactId>systemstate-jbc</artifactId>
                     <version>${project.version}</version>
-                    <type>firebase-sar</type>
+                    <type>sar</type>
+		    <scope>provided</scope>
                 </dependency>
                 
                 <dependency>
                     <groupId>com.cubeia.firebase.service.mbus</groupId>
                     <artifactId>mbus-dqueue</artifactId>
                     <version>${project.version}</version>
-                    <type>firebase-sar</type>
+                    <type>sar</type>
+		    <scope>provided</scope>
                 </dependency>
                 
                 <dependency>
                     <groupId>com.cubeia.lab.tspace</groupId>
                     <artifactId>t-space</artifactId>
                     <version>${project.version}</version>
-                    <type>firebase-sar</type>
+                    <type>sar</type>
+		    <scope>provided</scope>
                 </dependency>
             </dependencies>
             
 					</snapshots>
 				</repository>
 			</repositories>
+
+<build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.7</version>
+        <executions>
+          <execution>
+            <id>copy</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                   <groupId>com.cubeia.lab.tspace</groupId>
+                    <artifactId>t-space</artifactId>
+<type>sar</type>
+                </artifactItem>
+                <artifactItem>
+                    <groupId>com.cubeia.firebase.service.mbus</groupId>
+                    <artifactId>mbus-dqueue</artifactId>
+<type>sar</type>
+                </artifactItem>
+                <artifactItem>
+                    <groupId>com.cubeia.firebase.service.systemstate</groupId>
+                    <artifactId>systemstate-jbc</artifactId>
+<type>sar</type>
+                </artifactItem>
+                <artifactItem>
+                    <groupId>com.cubeia.firebase.service.conn</groupId>
+                    <artifactId>conn-jgroups</artifactId>
+<type>sar</type>
+                </artifactItem>
+              </artifactItems>
+              <outputDirectory>${project.build.directory}/ee-services</outputDirectory>
+              <overWriteReleases>true</overWriteReleases>
+              <overWriteSnapshots>true</overWriteSnapshots>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
             
         </profile>
  
 		<styx-version>1.14</styx-version>
 		<assemblyName>firebase-${project.version}-CE</assemblyName>
 		<assembly>src/main/assembly/firebase-fce-release-assembly.xml</assembly>
+		<src-assembly>src/main/assembly/firebase-fce-project-assembly.xml</src-assembly>
 		<attachPhase>package</attachPhase>
 		<header>src/main/resources/docs/header-ce.txt</header>
 		<firebase-ce-version>${project.version}</firebase-ce-version>

src/main/assembly/firebase-fce-project-assembly.xml

+<assembly>
+  <id>CE-project</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <directory>${project.basedir}</directory>
+      <outputDirectory>/</outputDirectory>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <excludes>
+        <exclude>**/*.log</exclude>
+        <exclude>**/${project.build.directory}/**</exclude>
+      </excludes>
+    </fileSet>
+  </fileSets>
+</assembly>

src/main/assembly/firebase-fce-release-assembly.xml

 <assembly>
-  <id>release</id>
+  <id>CE-release</id>
   <formats>
     <format>tar.gz</format>
     <format>zip</format>

src/main/assembly/firebase-fee-project-assembly.xml

+<assembly>
+  <id>EE-project</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <directory>${project.basedir}</directory>
+      <outputDirectory>/</outputDirectory>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <excludes>
+        <exclude>**/*.log</exclude>
+        <exclude>**/${project.build.directory}/**</exclude>
+      </excludes>
+    </fileSet>
+  </fileSets>
+</assembly>

src/main/assembly/firebase-fee-release-assembly.xml

 <assembly>
-  <id>release</id>
+  <id>EE-release</id>
   <formats>
   	<format>tar.gz</format>
     <format>zip</format>
     <componentDescriptor>src/main/assembly/core-assembly-component.xml</componentDescriptor>
   </componentDescriptors>
 
+  <fileSets>
+    <fileSet>
+      <directory>${project.build.directory}/ee-services</directory>
+      <outputDirectory>lib/internal</outputDirectory>
+      <includes>
+	 <include>*</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+
   <!-- 
   Note, because Maven sucks, we can't put the moduleSets in a component. 
   So this stuff is duplicated in the all assemblies.