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="This provokes an error." />
|
||||
<image value="X:\Invalid\Path\Does\Not\Exist.img" />
|
||||
<email value="address@provider.com"/>
|
||||
<mail_server value="mail.localhost.com" />
|
||||
</Properties>
|
@ -381,13 +381,14 @@ def run_config_test(config_file):
|
||||
if file_exists(value):
|
||||
values.append(value)
|
||||
html_add_images(values)
|
||||
images = []
|
||||
# Run the test for each file in the configuration
|
||||
global args
|
||||
if(args.contin):
|
||||
#set all times an image has been processed to 0
|
||||
for element in parsed.getElementsByTagName("image"):
|
||||
value = element.getAttribute("value").encode().decode("utf-8")
|
||||
counts[value] = 0
|
||||
images.append(value)
|
||||
#Begin infiniloop
|
||||
if(newDay()):
|
||||
global daycount
|
||||
@ -402,6 +403,8 @@ def run_config_test(config_file):
|
||||
pid = subprocess.Popen(nxtproc,
|
||||
stdout=subprocess.PIPE)
|
||||
sys.exit()
|
||||
for img in images
|
||||
run_test(img, 0 )
|
||||
else:
|
||||
for img in values:
|
||||
if file_exists(img):
|
||||
@ -1609,6 +1612,8 @@ def send_email():
|
||||
global errorem
|
||||
global attachl
|
||||
global html
|
||||
if(not args.config)
|
||||
sys.exit()
|
||||
element = parsed.getElementsByTagName("email")[0]
|
||||
toval = element.getAttribute("value").encode().decode("utf-8")
|
||||
element = parsed.getElementsByTagName("mail_server")[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user