build_and_test 605 Bytes
Newer Older
incardon's avatar
incardon committed
1 2
#! /bin/bash

incardon's avatar
incardon committed
3
echo "Set environment"
incardon's avatar
incardon committed
4

incardon's avatar
incardon committed
5
# Custom script to set environment variables like FIJI path TEST path JAVA_HOME
6
source ~/.bashrc_custom
incardon's avatar
incardon committed
7

incardon's avatar
incardon committed
8 9
cd plugin

10 11
export ANT_OPTS="-Xms1024m -Xmx4096m -XX:PermSize=1024m -XX:MaxPermSize=2048m"

incardon's avatar
incardon committed
12
ant main
13 14 15 16 17 18 19 20 21 22
if [ $? -ne 0 ]
then
        echo "Error compiling"
        exit 1
fi

ant jtest

if [ $? -ne 0 ]
then
gonciarz's avatar
gonciarz committed
23
	echo "Error in the unit tests"
24 25
	exit 1
fi
incardon's avatar
incardon committed
26

27
cd $FIJI_MOSAIC_PLUGIN_PATH/../..
incardon's avatar
incardon committed
28

gonciarz's avatar
gonciarz committed
29
./ImageJ-linux64 --system -batch test.ijm "username=incardon"
30 31 32 33 34 35 36 37 38

# check if tmp/test has succeful file

if [ ! -e "/tmp/test/succeful"  ]
then
	echo "Error in the tests"
	exit 1
fi