mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
improved test functionality
This commit is contained in:
parent
b246e116f2
commit
73d38769b9
@ -35,4 +35,6 @@ It is up to the user to distinguish between the paths when adding to this file.
|
|||||||
<image value="X:\path\to\a\different\image\file.E01" />
|
<image value="X:\path\to\a\different\image\file.E01" />
|
||||||
<image value="This provokes an error." />
|
<image value="This provokes an error." />
|
||||||
<image value="X:\Invalid\Path\Does\Not\Exist.img" />
|
<image value="X:\Invalid\Path\Does\Not\Exist.img" />
|
||||||
|
<email value="address@provider.com"/>
|
||||||
|
<mail_server value="mail.localhost.com" />
|
||||||
</Properties>
|
</Properties>
|
@ -381,13 +381,14 @@ def run_config_test(config_file):
|
|||||||
if file_exists(value):
|
if file_exists(value):
|
||||||
values.append(value)
|
values.append(value)
|
||||||
html_add_images(values)
|
html_add_images(values)
|
||||||
|
images = []
|
||||||
# Run the test for each file in the configuration
|
# Run the test for each file in the configuration
|
||||||
global args
|
global args
|
||||||
if(args.contin):
|
if(args.contin):
|
||||||
#set all times an image has been processed to 0
|
#set all times an image has been processed to 0
|
||||||
for element in parsed.getElementsByTagName("image"):
|
for element in parsed.getElementsByTagName("image"):
|
||||||
value = element.getAttribute("value").encode().decode("utf-8")
|
value = element.getAttribute("value").encode().decode("utf-8")
|
||||||
counts[value] = 0
|
images.append(value)
|
||||||
#Begin infiniloop
|
#Begin infiniloop
|
||||||
if(newDay()):
|
if(newDay()):
|
||||||
global daycount
|
global daycount
|
||||||
@ -402,6 +403,8 @@ def run_config_test(config_file):
|
|||||||
pid = subprocess.Popen(nxtproc,
|
pid = subprocess.Popen(nxtproc,
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
for img in images
|
||||||
|
run_test(img, 0 )
|
||||||
else:
|
else:
|
||||||
for img in values:
|
for img in values:
|
||||||
if file_exists(img):
|
if file_exists(img):
|
||||||
@ -1609,6 +1612,8 @@ def send_email():
|
|||||||
global errorem
|
global errorem
|
||||||
global attachl
|
global attachl
|
||||||
global html
|
global html
|
||||||
|
if(not args.config)
|
||||||
|
sys.exit()
|
||||||
element = parsed.getElementsByTagName("email")[0]
|
element = parsed.getElementsByTagName("email")[0]
|
||||||
toval = element.getAttribute("value").encode().decode("utf-8")
|
toval = element.getAttribute("value").encode().decode("utf-8")
|
||||||
element = parsed.getElementsByTagName("mail_server")[0]
|
element = parsed.getElementsByTagName("mail_server")[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user