Commit b172c0bd authored by incardon's avatar incardon

Unit test full + incardon + gonciarz on jenkins + generic script

parent daa60c60
......@@ -3,16 +3,34 @@
echo "Set environment"
# For unkown reason source the file on the slave does not work so we have to do in this horrible way
export JAVA_HOME=/usr/lib/jvm/java-6-oracle
export FIJI_MOSAIC_PLUGIN_PATH=/home/jenkins/Fiji.app/plugins/Mosaic_ToolSuite
export MOSAIC_PLUGIN_TEST_DATA_PATH=/home/jenkins/workspace/Mosaic_ToolSuite/label/nyu/plugin/Jtest_data/
~/.bashrc
export JAVA_HOME=/usr/lib/jvm/java-6-oracle
cd plugin
ant main
if [ $? -ne 0 ]
then
echo "Error compiling"
exit 1
fi
ant jtest
if [ $? -ne 0 ]
then
echo "Error in the tests"
exit 1
fi
cd ~/Fiji.app
cd $FIJI_MOSAIC_PLUGIN_PATH/../..
./ImageJ-linux64 -batch test.ijm "username=incardon"
# check if tmp/test has succeful file
if [ ! -e "/tmp/test/succeful" ]
then
echo "Error in the tests"
exit 1
fi
package mosaic.plugins;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import org.scijava.util.FileUtils;
import mosaic.core.utils.MosaicTest;
import ij.IJ;
import ij.ImagePlus;
import ij.plugin.filter.PlugInFilter;
......@@ -33,6 +40,11 @@ public class Jtest implements PlugInFilter
@Override
public int setup(String arg0, ImagePlus arg1)
{
// Get the User home directory
String test = MosaicTest.getTestEnvironment();
File s_file = new File(test + File.separator + "succeful");
FileUtils.deleteRecursively(s_file);
// Test CSV system
mosaic.core.ipc.Jtest jtestIPC = new mosaic.core.ipc.Jtest();
......@@ -64,6 +76,18 @@ public class Jtest implements PlugInFilter
jtestRC.segmentation();
IJ.showMessage("All test SUCCEFULLY completed");
// Create a file that notify all test has been completed suceffuly
try
{
PrintWriter succeful = new PrintWriter(test + File.separator + "succeful");
succeful.write(1);
succeful.close();
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
return DONE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment