summaryrefslogtreecommitdiffstats
path: root/verigraph/buildVeriGraph_gRPC.xml
diff options
context:
space:
mode:
Diffstat (limited to 'verigraph/buildVeriGraph_gRPC.xml')
-rw-r--r--verigraph/buildVeriGraph_gRPC.xml210
1 files changed, 0 insertions, 210 deletions
diff --git a/verigraph/buildVeriGraph_gRPC.xml b/verigraph/buildVeriGraph_gRPC.xml
deleted file mode 100644
index d23daa0..0000000
--- a/verigraph/buildVeriGraph_gRPC.xml
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2017 Politecnico di Torino and others.
-
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Apache License, Version 2.0
- which accompanies this distribution, and is available at
- http://www.apache.org/licenses/LICENSE-2.0
--->
-
-<project name="gRPC-Verigraph" default="run-tests" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
- <description>
- Script for gRPC-Verigraph
- </description>
-
- <!-- The location of this assignment -->
- <property name="grpc.location" location="." />
-
- <!-- The location to be used for class files -->
- <property name="build.dir" location="${grpc.location}/build" />
- <!-- The location for source files -->
- <property name="src.dir" location="${grpc.location}/src/main/java" />
- <!-- The location for solutions -->
- <property name="grpc.dir" value="src/main/java/it/polito/grpc" />
- <!-- The location for jar files -->
- <property name="lib.dir" location="${grpc.location}/lib" />
- <!-- The location for jar files -->
- <property name="other_lib.dir" location="${grpc.location}/service/build" />
- <!-- The location for generated files -->
- <property name="generated.dir" location="${basedir}/target/generated-sources" />
- <!-- The default test class -->
- <property name="test1.class" value="it.polito.grpc.test.GrpcServerTest" />
- <property name="test2.class" value="it.polito.grpc.test.GrpcTest" />
- <property name="test3.class" value="it.polito.grpc.test.MultiThreadTest" />
- <property name="test4.class" value="it.polito.grpc.test.ReachabilityTest" />
-
- <!-- The name to be given to the final zip -->
- <property name="sol.zip" value="grpc.zip" />
-
- <!-- Java compiler settings -->
- <property name="debug" value="true" />
- <property name="debuglevel" value="source,lines,vars" />
- <property name="target" value="1.8" />
- <property name="source" value="1.8" />
-
- <!-- The classpath to be used for running the tests -->
- <path id="test.classpath">
- <pathelement path="${build.dir}" />
- <fileset dir="${grpc.location}/lib">
- <include name="*.jar" />
- </fileset>
- <fileset refid="mvn-dependencies" />
- </path>
-
- <!-- Here starts part for Maven -->
- <path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
- <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
- uri="antlib:org.apache.maven.artifact.ant"
- classpathref="maven-ant-tasks.classpath" />
- <property file="build.properties"/>
-
- <!-- Load pom.xml for dependencies -->
- <artifact:pom id="pomfile" file="pom.xml" />
- <artifact:dependencies filesetId="mvn-dependencies" pomRefId="pomfile" />
-
- <!-- Grab the HSQLDB jar and add it to the classpath
- <artifact:dependencies filesetId="warDeps">
- <dependency groupId="org.glassfish.jersey" artifactId="jersey-bom" version="2.22.1" />
- </artifact:dependencies>-->
-
- <path id="build.classpath">
- <fileset refid="mvn-dependencies" />
- </path>
-
- <target name="init">
- <mkdir dir="${build.dir}" />
- </target>
-
- <!-- The target for compiling the gRPC application -->
- <target name="build" depends="init" description="Build the sources">
- <echo>Building gRPC (if needed)...</echo>
- <javac
- debug="${debug}"
- debuglevel="${debuglevel}"
- source="${source}"
- target="${target}"
- destdir="${build.dir}"
- classpathref="build.classpath"
- includeantruntime="false">
- <src path="${generated.dir}" />
- <src path="${src.dir}" />
- <compilerarg value="-Xlint:unchecked"/>
- <classpath>
- <pathelement path="${other_lib.dir}/qjutils.jar"/>
- </classpath>
- </javac>
- <echo>Done.</echo>
- </target>
-
- <!-- The target for running the gRPC application -->
- <target name="run" depends="build" description="Run gRPC">
- <parallel>
- <sequential>
- <java classname="it.polito.grpc.Service" failonerror="true" classpathref="build.classpath" fork="yes">
- <classpath>
- <pathelement path="${build.dir}"/>
- </classpath>
- </java>
- </sequential>
- <sequential>
- <sleep milliseconds="500"/>
- <java classname="it.polito.grpc.Client" failonerror="true" classpathref="build.classpath" fork="yes">
- <classpath>
- <pathelement path="${build.dir}"/>
- </classpath>
- </java>
- </sequential>
- </parallel>
- </target>
-
- <target name="run-client" depends="build" description="Run gRPC client">
- <java classname="it.polito.grpc.Client" failonerror="true" classpathref="build.classpath" fork="yes">
- <classpath>
- <pathelement path="${build.dir}"/>
- </classpath>
- </java>
- </target>
-
- <target name="run-server" depends="build" description="Run gRPC server">
- <java classname="it.polito.grpc.Service" failonerror="true" classpathref="build.classpath" fork="yes">
- <classpath>
- <pathelement path="${build.dir}"/>
- </classpath>
- </java>
- </target>
-
- <target name="run-tests" description="Run tests for gRPC">
- <echo>Running functional tests</echo>
-
- <antcall target="runFuncTest.real">
- <param name="exit.code1" value="126" />
- <param name="exit.code2" value="125" />
- <param name="exit.code3" value="124" />
- <param name="exit.code4" value="123" />
- </antcall>
- </target>
-
- <!-- Target runFuncTest.real -->
- <target name="runFuncTest.real" depends="build">
-
- <echo>Running First set of Junit tests...</echo>
- <junit printsummary="yes" dir="." fork="yes" haltonfailure="no" showoutput="no" filtertrace="true" timeout="120000">
- <jvmarg value="-Djava.awt.headless=true" />
- <formatter type="brief" usefile="false"/>
- <test haltonfailure="no" failureproperty="test_failed" name="${test1.class}"/>
- <classpath>
- <path refid="test.classpath" />
- </classpath>
- </junit>
- <fail if="test_failed" status="${exit.code1}" message="*** First set of Junit tests: Some Tests FAILED ***"/>
- <echo>*** First set of Junit tests: All Tests PASSED ***</echo>
-
- <echo>Running Second set of Junit tests...</echo>
- <junit printsummary="yes" dir="." fork="yes" haltonfailure="no" showoutput="no" filtertrace="true" timeout="120000">
- <jvmarg value="-Djava.awt.headless=true" />
- <formatter type="brief" usefile="false"/>
- <test haltonfailure="no" failureproperty="test_failed" name="${test2.class}"/>
- <classpath>
- <path refid="test.classpath" />
- </classpath>
- </junit>
- <fail if="test_failed" status="${exit.code2}" message="*** Second set of Junit tests: Some Tests FAILED ***"/>
- <echo>*** Second set of Junit tests: All Tests PASSED ***</echo>
-
- <echo>Running Third set of Junit tests...</echo>
- <junit printsummary="yes" dir="." fork="yes" haltonfailure="no" showoutput="no" filtertrace="true" timeout="120000">
- <jvmarg value="-Djava.awt.headless=true" />
- <formatter type="brief" usefile="false"/>
- <test haltonfailure="no" failureproperty="test_failed" name="${test3.class}"/>
- <classpath>
- <path refid="test.classpath" />
- </classpath>
- </junit>
- <fail if="test_failed" status="${exit.code3}" message="*** Third set of Junit tests: Some Tests FAILED ***"/>
- <echo>*** Third set of Junit tests: All Tests PASSED ***</echo>
-
- <echo>Running Fourth set of Junit tests...</echo>
- <junit printsummary="yes" dir="." fork="yes" haltonfailure="no" showoutput="no" filtertrace="true" timeout="120000">
- <jvmarg value="-Djava.awt.headless=true" />
- <jvmarg value="-Djava.library.path=${other_lib.dir}" />
- <formatter type="brief" usefile="false"/>
- <test haltonfailure="no" failureproperty="test_failed" name="${test4.class}"/>
- <classpath>
- <path refid="test.classpath" />
- <fileset dir="${other_lib.dir}">
- <include name="*.jar" />
- </fileset>
- </classpath>
- </junit>
- <fail if="test_failed" status="${exit.code4}" message="*** Fourth set of Junit tests: Some Tests FAILED ***"/>
- <echo>*** Fourth set of Junit tests: All Tests PASSED ***</echo>
- <echo>***************************************************</echo>
- <echo>*************** All Tests PASSED *****************</echo>
- </target>
-
- <!-- target for cleaning -->
- <target name="clean">
- <delete dir="${build.dir}" />
- </target>
-</project>