mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
updates to regression testing
This commit is contained in:
parent
fd40cde19b
commit
6c8199d62c
1
.gitignore
vendored
1
.gitignore
vendored
@ -47,6 +47,7 @@ genfiles.properties
|
||||
!/branding/nbproject/project.xml
|
||||
!/branding/nbproject/project.properties
|
||||
/Testing/script/input/
|
||||
/Testing/script/input/*
|
||||
/Testing/script/output/
|
||||
/Testing/script/gold/
|
||||
/Testing/script/ScriptLog.txt
|
||||
|
@ -25,6 +25,7 @@ from email import Encoders
|
||||
import urllib2
|
||||
import re
|
||||
import zipfile
|
||||
import zlib
|
||||
|
||||
#
|
||||
# Please read me...
|
||||
@ -533,7 +534,7 @@ def run_test(image_file, count):
|
||||
gold_path = os.path.join(case.gold)
|
||||
img_gold = os.path.join(case.gold, case.image_name)
|
||||
img_archive = os.path.join(case.gold, case.image_name+"-archive.zip")
|
||||
extrctr = zipfile.ZipFile(img_archive, 'r')
|
||||
extrctr = zipfile.ZipFile(img_archive, 'r', zipfile.ZIP_DEFLATED)
|
||||
extrctr.extractall(gold_path)
|
||||
extrctr.close
|
||||
compare_to_gold_db()
|
||||
@ -590,7 +591,7 @@ def run_ant():
|
||||
if SYS is OS.CYGWIN:
|
||||
subprocess.call(case.ant, stdout=antout)
|
||||
elif SYS is OS.WIN:
|
||||
theproc = subprocess.Popen(case.ant, shell = True)
|
||||
theproc = subprocess.Popen(case.ant, shell = True, stdout=subprocess.PIPE)
|
||||
theproc.communicate()
|
||||
antout.close()
|
||||
|
||||
@ -612,7 +613,8 @@ def image_type(image_file):
|
||||
return IMGTYPE.UNKNOWN
|
||||
|
||||
|
||||
|
||||
#http://digitalcorpora.org/corp/nps/drives/nps-2008-jean/nps-2008-jean.E01
|
||||
#http://digitalcorpora.org/corp/nps/drives/nps-2008-jean/nps-2008-jean.E02
|
||||
#-----------------------------------------------------------#
|
||||
# Functions relating to rebuilding and comparison #
|
||||
# of gold standards #
|
||||
@ -654,7 +656,7 @@ def rebuild():
|
||||
os.chdir(case.gold)
|
||||
img_archive = make_local_path(case.image_name+"-archive.zip")
|
||||
img_gold = os.path.join(case.image_name)
|
||||
comprssr = zipfile.ZipFile(img_archive, 'w')
|
||||
comprssr = zipfile.ZipFile(img_archive, 'w',zipfile.ZIP_DEFLATED)
|
||||
zipdir(img_gold, comprssr)
|
||||
comprssr.close()
|
||||
del_dir(gold_dir)
|
||||
|
@ -51,6 +51,7 @@ import org.netbeans.jemmy.operators.JButtonOperator;
|
||||
import org.netbeans.jemmy.operators.JCheckBoxOperator;
|
||||
import org.netbeans.jemmy.operators.JDialogOperator;
|
||||
import org.netbeans.jemmy.operators.JFileChooserOperator;
|
||||
import org.netbeans.jemmy.operators.JLabelOperator;
|
||||
import org.netbeans.jemmy.operators.JTabbedPaneOperator;
|
||||
import org.netbeans.jemmy.operators.JTableOperator;
|
||||
import org.netbeans.jemmy.operators.JTextFieldOperator;
|
||||
@ -297,19 +298,22 @@ public class RegressionTest extends TestCase{
|
||||
JButtonOperator jbo1 = new JButtonOperator(reportDialogOperator, "Finish");
|
||||
jbo1.pushNoBlock();
|
||||
boolean waiting = true;
|
||||
new Timeout("pausing", 500).sleep();
|
||||
long size = 0;
|
||||
java.io.File rprtfldr = new java.io.File(System.getProperty("out_path")+java.io.File.separator+"AutopsyTestCase"+java.io.File.separator+"Reports"+java.io.File.separator+"AutopsyTestCase "+datenotime+java.io.File.separator+"HTML Report");
|
||||
while(waiting)
|
||||
{
|
||||
new Timeout("pausing", 500).sleep();
|
||||
long currsize = size;
|
||||
size = 0;
|
||||
for(java.io.File elem: rprtfldr.listFiles())
|
||||
{
|
||||
size+=elem.getTotalSpace();
|
||||
}
|
||||
System.out.println("\nJAVA:"+size);
|
||||
System.out.println("JAVA:"+currsize);
|
||||
waiting = size>currsize;
|
||||
}
|
||||
new Timeout("pausing", 20000).sleep(); // Give it a few seconds to generate
|
||||
screenshot("Progress");
|
||||
JDialog previewDialog = JDialogOperator.waitJDialog("Progress", false, false);
|
||||
JDialogOperator previewDialogOperator = new JDialogOperator(previewDialog);
|
||||
|
@ -17,7 +17,7 @@
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
<import file="build-${os.family}.xml"/>
|
||||
|
||||
<property name="test-input" location="Testing/script/input"/>
|
||||
<property name="thirdparty.dir" value="${basedir}/thirdparty" />
|
||||
|
||||
<!-- import ant-contrib tools -->
|
||||
@ -239,4 +239,9 @@
|
||||
<target name="build-installer" depends="build-installer-dir" description="Builds Autopsy installer.">
|
||||
<antcall target="build-installer-${os.family}" />
|
||||
</target>
|
||||
<target name="test-download-imgs" description="Get test images and store them in the path represented by the test-input variable.">
|
||||
<mkdir dir="${test-input}" />
|
||||
<get src="http://digitalcorpora.org/corp/nps/drives/nps-2008-jean/nps-2008-jean.E01" dest="${test-input}"/>
|
||||
<get src="http://digitalcorpora.org/corp/nps/drives/nps-2008-jean/nps-2008-jean.E02" dest="${test-input}"/>
|
||||
</target>
|
||||
</project>
|
||||
|
Loading…
x
Reference in New Issue
Block a user