Commit e56b9db6 authored by Daniel Tuulik's avatar Daniel Tuulik Committed by Daniel Tuulik
Browse files

Save the output of test to file and diff it against an expected file

parent b5006f59
......@@ -218,10 +218,18 @@ def _run_gprbuild(gprfile, exec_file):
return (errcode, stdout, stderr)
if os.path.isfile (exec_file):
p = subprocess.Popen (exec_file, stdout=subprocess.PIPE,
actual = open("actual","w+")
p = subprocess.Popen (exec_file, stdout=actual,
stdout, stderr = p.communicate()
errcode = p.wait()
if errcode != 0:
return (errcode, stdout, stderr)
if os.path.isfile ("expected"):
errcode = os.system ("diff expected actual")
return (errcode, stdout, stderr)
return (errcode, stdout, stderr)
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