-
Notifications
You must be signed in to change notification settings - Fork 38
/
run-tests.py
42 lines (34 loc) · 1021 Bytes
/
run-tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os
import sys
sys.path.append('../python-student-support-code')
sys.path.append('../python-student-support-code/interp_x86')
import compiler
import interp_Lvar
import type_check_Lvar
from utils import run_tests, run_one_test, enable_tracing
from interp_x86.eval_x86 import interp_x86
enable_tracing()
compiler = compiler.Compiler()
typecheck_Lvar = type_check_Lvar.TypeCheckLvar().type_check
typecheck_dict = {
'source': typecheck_Lvar,
'remove_complex_operands': typecheck_Lvar,
}
interpLvar = interp_Lvar.InterpLvar().interp
interp_dict = {
'remove_complex_operands': interpLvar,
'select_instructions': interp_x86,
'assign_homes': interp_x86,
'patch_instructions': interp_x86,
}
if True:
run_tests('var', compiler, 'var',
typecheck_dict,
interp_dict)
else:
run_one_test(os.getcwd() + '/tests/var/zero.py',
'var',
compiler,
'var',
typecheck_dict,
interp_dict)