1
1
from __future__ import annotations
2
2
3
+ import logging
3
4
import sys
4
5
from shutil import copytree
6
+ from subprocess import CalledProcessError
5
7
from typing import TYPE_CHECKING
6
8
7
9
import pytest
30
32
sys .setrecursionlimit (10 ** 7 )
31
33
32
34
35
+ _LOGGER : Final = logging .getLogger (__name__ )
36
+
37
+
33
38
@pytest .fixture (scope = 'module' )
34
39
def server_end_to_end (foundry_end_to_end : Foundry , no_use_booster : bool ) -> Iterator [KoreServer ]:
35
40
llvm_definition_dir = foundry_end_to_end .out / 'kompiled' / 'llvm-library' if not no_use_booster else None
@@ -56,21 +61,31 @@ def foundry_end_to_end(foundry_root_dir: Path | None, tmp_path_factory: TempPath
56
61
root_tmp_dir = tmp_path_factory .getbasetemp ().parent
57
62
58
63
foundry_root = root_tmp_dir / 'kontrol-test-project'
64
+ _LOGGER .warning (f'foundry_end_to_end worker_id: { worker_id } ' )
65
+ _LOGGER .warning (f'foundry_end_to_end foundry_root: { foundry_root } ' )
59
66
with FileLock (str (foundry_root ) + '.lock' ):
60
67
if not foundry_root .is_dir ():
61
68
init_project (project_root = foundry_root , skip_forge = False )
62
69
copytree (str (TEST_DATA_DIR / 'src' ), str (foundry_root / 'test' ), dirs_exist_ok = True )
63
70
append_to_file (foundry_root / 'foundry.toml' , foundry_toml_cancun_schedule ())
64
71
65
- foundry_kompile (
66
- BuildOptions (
67
- {
68
- 'metadata' : False ,
69
- 'auxiliary_lemmas' : True ,
70
- }
71
- ),
72
- foundry = Foundry (foundry_root ),
73
- )
72
+ try :
73
+ foundry_kompile (
74
+ BuildOptions (
75
+ {
76
+ 'metadata' : False ,
77
+ 'auxiliary_lemmas' : True ,
78
+ 'verbose' : True ,
79
+ 'debug' : True ,
80
+ }
81
+ ),
82
+ foundry = Foundry (foundry_root ),
83
+ )
84
+ except CalledProcessError as e :
85
+ _LOGGER .warning (e )
86
+ _LOGGER .warning (e .stdout )
87
+ _LOGGER .warning (e .stderr )
88
+ raise
74
89
75
90
session_foundry_root = tmp_path_factory .mktemp ('kontrol-test-project' )
76
91
copytree (str (foundry_root ), str (session_foundry_root ), dirs_exist_ok = True )
0 commit comments