File tree 3 files changed +16
-7
lines changed
3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,25 @@ def check_model(module_path, model):
48
48
)
49
49
match tlc_result :
50
50
case TimeoutExpired ():
51
- logging .debug (tlc_result .stdout )
51
+ args , _ = tlc_result .args
52
+ logging .debug (' ' .join (args ))
53
+ logging .debug (
54
+ # Returns string on Windows, bytes everywhere else
55
+ tlc_result .stdout
56
+ if type (tlc_result .stdout ) == str
57
+ else tlc_result .stdout .decode ('utf-8' )
58
+ )
52
59
return True
53
60
case CompletedProcess ():
61
+ output = ' ' .join (tlc_result .args ) + '\n ' + tlc_result .stdout
54
62
logging .warning (f'Model { model_path } finished quickly, within { smoke_test_timeout_in_seconds } seconds; consider labeling it a small model' )
55
63
expected_result = model ['result' ]
56
64
actual_result = tla_utils .resolve_tlc_exit_code (tlc_result .returncode )
57
- if expected_result != actual_result :
65
+ if expected_result == actual_result :
66
+ logging .debug (output )
67
+ else :
58
68
logging .error (f'Model { model_path } expected result { expected_result } but got { actual_result } ' )
59
- logging .error (tlc_result . stdout )
69
+ logging .error (output )
60
70
return False
61
71
return True
62
72
case _:
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ def write_json(data, path):
52
52
53
53
def parse_module (examples_root , parser , path ):
54
54
"""
55
- Parses a .tla file; returns the parse tree along with whether a parse
56
- error was detected.
55
+ Parses a .tla file with tree-sitter ; returns the parse tree along with
56
+ whether a parse error was detected.
57
57
"""
58
58
module_text = None
59
59
path = from_cwd (examples_root , path )
Original file line number Diff line number Diff line change 15
15
runs-on : ${{ matrix.os }}
16
16
strategy :
17
17
matrix :
18
- # macOS not used; see https://github.com/tlaplus/Examples/issues/119
19
- os : [windows-latest, ubuntu-latest]
18
+ os : [windows-latest, ubuntu-latest, macos-latest]
20
19
unicode : [true, false]
21
20
fail-fast : false
22
21
env :
You can’t perform that action at this time.
0 commit comments