use getdatadir for regression test

This commit is contained in:
rishwanth1995 2018-03-29 14:43:29 -04:00
parent 6b2dee552a
commit 89a79b9218
4 changed files with 32 additions and 4 deletions

22
.travis.yml Normal file
View File

@ -0,0 +1,22 @@
language: java
sudo: required
dist: trusty
os:
- linux
env:
global:
- TSK_HOME=$TRAVIS_BUILD_DIR/sleuthkit/sleuthkit
jdk:
- oraclejdk8
before_install:
- git clone https://github.com/sleuthkit/sleuthkit.git sleuthkit/sleuthkit
install:
- sudo apt-get install testdisk
- cd sleuthkit/sleuthkit
- sh install-sleuthkit.sh
script:
- cd $TRAVIS_BUILD_DIR/
- ant build
- cd Core/
- xvfb-run ant test

View File

@ -12,7 +12,7 @@
<property name="thirdparty.dir" value="${basedir}/../thirdparty" />
<property name="modules.dir" value="${basedir}/release/modules/" />
<property name="ext.dir" value="${modules.dir}/ext" />
<property name="test-input" location="test"/>
<property name="test-input" location="test/qa-functional/data"/>
<target name="get-InternalPythonModules" description="get internal python modules">
<copy todir="release/InternalPythonModules" >
@ -83,6 +83,7 @@
</target>
<target name="getImageFile">
<mkdir dir="${basedir}/test/qa-functional/data"/>
<get src="https://drive.google.com/uc?id=0BxdBkzm5VKGNT0dGY0dqcHVsU3M" dest="${test-input}/filter_test1.img" skipexisting="true"/>
</target>
<target name="get-deps" depends="init-ivy,getTSKJars,get-thirdparty-dependencies,get-InternalPythonModules, download-binlist, getImageFile">

Binary file not shown.

View File

@ -32,6 +32,7 @@ import org.sleuthkit.autopsy.casemodule.CaseActionException;
import org.sleuthkit.autopsy.casemodule.CaseDetails;
import junit.framework.Test;
import org.apache.commons.io.FileUtils;
import org.netbeans.junit.NbTestCase;
import org.openide.util.Exceptions;
import org.python.icu.impl.Assert;
import org.sleuthkit.autopsy.casemodule.ImageDSProcessor;
@ -47,11 +48,11 @@ import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.TskCoreException;
public class IngestFileFiltersTest extends TestCase {
public class IngestFileFiltersTest extends NbTestCase {
private static final Path CASE_DIRECTORY_PATH = Paths.get(System.getProperty("java.io.tmpdir"), "IngestFileFiltersTest");
private static final File CASE_DIR = new File(CASE_DIRECTORY_PATH.toString());
private static final Path IMAGE_PATH = Paths.get("test/filter_test1.img");
private final Path IMAGE_PATH = Paths.get(this.getDataDir().toString(),"filter_test1.img");
public static Test suite() {
NbModuleSuite.Configuration conf = NbModuleSuite.createConfiguration(IngestFileFiltersTest.class).
@ -60,6 +61,10 @@ public class IngestFileFiltersTest extends TestCase {
return conf.suite();
}
public IngestFileFiltersTest(String name) {
super(name);
}
@Override
public void setUp() {
// Delete the test directory, if it exists