A number of small script fixes/tweaks from usage
- Fixed prettyasserts.py parsing when '->' is in expr - Made prettyasserts.py failures not crash (yay dynamic typing) - Fixed the initial state of the emubd disk file to match the internal state in RAM - Fixed true/false getting changed to True/False in test.py/bench.py defines - Fixed accidental substring matching in plot.py's --by comparison - Fixed a missed LFS_BLOCk_CYCLES in test_superblocks.toml that was missed - Changed test.py/bench.py -v to only show commands being run Including the test output is still possible with test.py -v -O-, making the implicit inclusion redundant and noisy. - Added license comments to bench_runner/test_runner
This commit is contained in:
+2
-2
@@ -118,6 +118,8 @@ class BenchCase:
|
||||
else:
|
||||
yield v_
|
||||
# or a literal value
|
||||
elif isinstance(v, bool):
|
||||
yield 'true' if v else 'false'
|
||||
else:
|
||||
yield v
|
||||
|
||||
@@ -817,8 +819,6 @@ def run_stage(name, runner_, ids, stdout_, trace_, output_, **args):
|
||||
stdout_.flush()
|
||||
except BrokenPipeError:
|
||||
pass
|
||||
if args.get('verbose'):
|
||||
sys.stdout.write(line)
|
||||
|
||||
m = pattern.match(line)
|
||||
if m:
|
||||
|
||||
+1
-1
@@ -535,7 +535,7 @@ def datasets(results, by=None, x=None, y=None, define=[]):
|
||||
results,
|
||||
x_,
|
||||
y_,
|
||||
[(by_, k_) for by_, k_ in zip(by, ks_)]
|
||||
[(by_, {k_}) for by_, k_ in zip(by, ks_)]
|
||||
if by is not None else [])
|
||||
|
||||
return datasets
|
||||
|
||||
+1
-1
@@ -286,7 +286,7 @@ def datasets(results, by=None, x=None, y=None, define=[]):
|
||||
results,
|
||||
x_,
|
||||
y_,
|
||||
[(by_, k_) for by_, k_ in zip(by, ks_)]
|
||||
[(by_, {k_}) for by_, k_ in zip(by, ks_)]
|
||||
if by is not None else [])
|
||||
|
||||
return datasets
|
||||
|
||||
@@ -39,6 +39,7 @@ LEXEMES = {
|
||||
'cmp': CMP.keys(),
|
||||
'logic': ['\&\&', '\|\|'],
|
||||
'sep': [':', ';', '\{', '\}', ','],
|
||||
'op': ['->'], # specifically ops that conflict with cmp
|
||||
}
|
||||
|
||||
|
||||
@@ -330,7 +331,7 @@ def p_expr(p):
|
||||
except ParseFailure:
|
||||
p.pop(state)
|
||||
res.append(p.expect('assert'))
|
||||
elif p.accept('string', None, 'ws'):
|
||||
elif p.accept('string', 'op', 'ws', None):
|
||||
res.append(p.m)
|
||||
else:
|
||||
return ''.join(res)
|
||||
@@ -414,7 +415,8 @@ def main(input=None, output=None, pattern=[], limit=LIMIT):
|
||||
f.write(p.m)
|
||||
else:
|
||||
break
|
||||
except ParseFailure as f:
|
||||
except ParseFailure as e:
|
||||
print('warning: %s' % e)
|
||||
pass
|
||||
|
||||
for i in range(p.off, len(p.tokens)):
|
||||
|
||||
+2
-2
@@ -121,6 +121,8 @@ class TestCase:
|
||||
else:
|
||||
yield v_
|
||||
# or a literal value
|
||||
elif isinstance(v, bool):
|
||||
yield 'true' if v else 'false'
|
||||
else:
|
||||
yield v
|
||||
|
||||
@@ -827,8 +829,6 @@ def run_stage(name, runner_, ids, stdout_, trace_, output_, **args):
|
||||
stdout_.flush()
|
||||
except BrokenPipeError:
|
||||
pass
|
||||
if args.get('verbose'):
|
||||
sys.stdout.write(line)
|
||||
|
||||
m = pattern.match(line)
|
||||
if m:
|
||||
|
||||
Reference in New Issue
Block a user