Commit e8b0805f authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team

compare-last-results.py: compare .vidjil files across several launches

This is a kind of generalized non-regression test, comparing
the two last .vidjil results for *all* files on the server.
parent 475df48f
DIR_SEQUENCES = '/mnt/upload/uploads'
for seq in db(db.sequence_file).select():
print "===", "seq-%d" % seq.id, "\t", seq.sampling_date, "\t", seq.filename, seq.data_file
files = []
for res in db(db.results_file.sequence_file_id == seq.id).select():
print " ", "sched-%d" % res.scheduler_task_id, "\t", res.run_date, "\t", res.data_file
if res.data_file:
files += [res.data_file]
if len(files) < 2:
continue
### Compare .vidjil files across several launches
old = files[-2]
new = files[-1]
com = 'python /home/vidjil/server/diff.py %s/%s %s/%s' % (DIR_SEQUENCES, old, DIR_SEQUENCES, new)
# print com
os.system(com)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment