blob: 1c47cc017a3faddb7b042db0db0447468df24b8e [file] [log] [blame]
Wenzel Jakob38bd7112015-07-05 20:05:44 +02001import subprocess, sys, os
2
3path = os.path.dirname(__file__)
4if path != '':
5 os.chdir(path)
6
7name = sys.argv[1]
8output = subprocess.check_output([sys.executable, name + ".py"]).decode('utf-8')
9reference = open(name + '.ref', 'r').read()
10
11if output == reference:
12 print('Test "%s" succeeded.' % name)
13 exit(0)
14else:
15 print('Test "%s" FAILED!' % name)
16 exit(-1)