mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
fixed regression.py
This commit is contained in:
parent
773f651134
commit
2c2832e59c
@ -421,33 +421,38 @@ def run_config_test(config_file):
|
|||||||
|
|
||||||
def compile():
|
def compile():
|
||||||
global redo
|
global redo
|
||||||
global redosccd
|
global tryredo
|
||||||
global daycount
|
global daycount
|
||||||
global nxtproc
|
global nxtproc
|
||||||
global failedbool
|
global failedbool
|
||||||
global errorem
|
global errorem
|
||||||
global attachl
|
global attachl
|
||||||
global passed
|
global passed
|
||||||
redosccd = False
|
passed = True
|
||||||
|
tryredo = False
|
||||||
setDay()
|
setDay()
|
||||||
if(not passed):
|
redo = True
|
||||||
gitPull("sleuthkit")
|
while(redo):
|
||||||
if(not passed):
|
passed = True
|
||||||
vsBuild()
|
if(passed):
|
||||||
if(not passed):
|
gitPull("sleuthkit")
|
||||||
gitPull("autopsy")
|
if(passed):
|
||||||
if(not passed):
|
vsBuild()
|
||||||
antBuild("datamodel", False)
|
if(passed):
|
||||||
if(not passed):
|
gitPull("autopsy")
|
||||||
antBuild("autopsy", True)
|
if(passed):
|
||||||
if(redo and not (redosccd)):
|
antBuild("datamodel", False)
|
||||||
attachl = []
|
if(passed):
|
||||||
errorem = "The test standard didn't match the gold standard.\n"
|
antBuild("autopsy", True)
|
||||||
failedbool = False
|
if(passed):
|
||||||
redosccd = True
|
redo = False
|
||||||
time.sleep(3600)
|
else:
|
||||||
compile()
|
print("Compile Failed")
|
||||||
if(redosccd and (not passed)):
|
time.sleep(3600)
|
||||||
|
attachl = []
|
||||||
|
errorem = "The test standard didn't match the gold standard.\n"
|
||||||
|
failedbool = False
|
||||||
|
if(tryredo):
|
||||||
errorem += "Rebuilt properly.\n"
|
errorem += "Rebuilt properly.\n"
|
||||||
send_email()
|
send_email()
|
||||||
attachl = []
|
attachl = []
|
||||||
@ -1353,7 +1358,8 @@ def gitPull(TskOrAutopsy):
|
|||||||
#Builds TSK as a win32 applicatiion
|
#Builds TSK as a win32 applicatiion
|
||||||
def vsBuild():
|
def vsBuild():
|
||||||
global redo
|
global redo
|
||||||
global redosccd
|
global tryredo
|
||||||
|
global passed
|
||||||
#Please ensure that the current working directory is $autopsy/testing/script
|
#Please ensure that the current working directory is $autopsy/testing/script
|
||||||
vs = []
|
vs = []
|
||||||
vs.append("/cygdrive/c/windows/microsoft.NET/framework/v4.0.30319/MSBuild.exe")
|
vs.append("/cygdrive/c/windows/microsoft.NET/framework/v4.0.30319/MSBuild.exe")
|
||||||
@ -1370,26 +1376,24 @@ def vsBuild():
|
|||||||
chk = os.path.join("..", "..", "..","sleuthkit", "win32", "Release", "libtsk_jni.dll")
|
chk = os.path.join("..", "..", "..","sleuthkit", "win32", "Release", "libtsk_jni.dll")
|
||||||
try:
|
try:
|
||||||
open(chk)
|
open(chk)
|
||||||
if(redo):
|
|
||||||
redosccd = True
|
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
global errorem
|
global errorem
|
||||||
global attachl
|
global attachl
|
||||||
if(not redo):
|
if(not tryredo):
|
||||||
errorem += "LIBTSK C++ failed to build.\n"
|
errorem += "LIBTSK C++ failed to build.\n"
|
||||||
attachl.append(VSpth)
|
attachl.append(VSpth)
|
||||||
send_email()
|
send_email()
|
||||||
|
tryredo = True
|
||||||
|
passed = False
|
||||||
redo = True
|
redo = True
|
||||||
if(redo and (not redosccd)):
|
|
||||||
time.sleep(3600)
|
|
||||||
compile()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Builds Autopsy or the Datamodel
|
#Builds Autopsy or the Datamodel
|
||||||
def antBuild(which, Build):
|
def antBuild(which, Build):
|
||||||
global redo
|
global redo
|
||||||
global redosccd
|
global passed
|
||||||
|
global tryredo
|
||||||
directory = os.path.join("..", "..")
|
directory = os.path.join("..", "..")
|
||||||
ant = []
|
ant = []
|
||||||
if which == "datamodel":
|
if which == "datamodel":
|
||||||
@ -1412,24 +1416,20 @@ def antBuild(which, Build):
|
|||||||
chk = os.path.join("..", "..", "..","sleuthkit", "bindings", "java", "dist", "TSK_DataModel.jar")
|
chk = os.path.join("..", "..", "..","sleuthkit", "bindings", "java", "dist", "TSK_DataModel.jar")
|
||||||
try:
|
try:
|
||||||
open(chk)
|
open(chk)
|
||||||
if(redo):
|
|
||||||
redosccd = True
|
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
if(not redo):
|
if(not tryredo):
|
||||||
errorem += "DataModel Java build failed.\n"
|
errorem += "DataModel Java build failed.\n"
|
||||||
attachl.append(antpth)
|
attachl.append(antpth)
|
||||||
send_email()
|
send_email()
|
||||||
redo = True
|
passed = False
|
||||||
if(redo and (not redosccd)):
|
tryredo = True
|
||||||
time.sleep(3600)
|
elif (succd != 0 and (not tryredo)):
|
||||||
compile()
|
|
||||||
elif (succd != 0 and (not redo)):
|
|
||||||
errorem += "Autopsy build failed.\n"
|
errorem += "Autopsy build failed.\n"
|
||||||
attachl.append(antpth)
|
attachl.append(antpth)
|
||||||
send_email()
|
send_email()
|
||||||
elif (redo and (not redosccd)):
|
tryredo = True
|
||||||
time.sleep(3600)
|
elif (succd != 0):
|
||||||
compile()
|
passed = False
|
||||||
|
|
||||||
|
|
||||||
#Watches clock and waits for current ingest to be done
|
#Watches clock and waits for current ingest to be done
|
||||||
@ -1716,8 +1716,13 @@ def send_email():
|
|||||||
global html
|
global html
|
||||||
if(not args.list):
|
if(not args.list):
|
||||||
sys.exit()
|
sys.exit()
|
||||||
element = parsed.getElementsByTagName("email")[0]
|
element = parsed.getElementsByTagName("email")
|
||||||
|
if(len(element)<=0):
|
||||||
|
return
|
||||||
|
element = element[0]
|
||||||
toval = element.getAttribute("value").encode().decode("utf-8")
|
toval = element.getAttribute("value").encode().decode("utf-8")
|
||||||
|
if(toval==None):
|
||||||
|
return
|
||||||
element = parsed.getElementsByTagName("mail_server")[0]
|
element = parsed.getElementsByTagName("mail_server")[0]
|
||||||
serverval = element.getAttribute("value").encode().decode("utf-8")
|
serverval = element.getAttribute("value").encode().decode("utf-8")
|
||||||
# Create the container (outer) email message.
|
# Create the container (outer) email message.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user