Skip to content

Commit 9127f8c

Browse files
update test-related configurations in repo
1 parent 6aaa1a4 commit 9127f8c

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ book/pp.tex
5454

5555
# Auto-generated by Makefile's [gen] target
5656
harmony_model_checker/__init__.py
57+
58+
.coverage

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,16 @@ upload: dist
4343
twine upload dist/*
4444

4545
clean:
46+
# Harmony outputs in `code` directory
4647
rm -f code/*.htm code/*.hvm code/*.hco code/*.png code/*.hfa code/*.tla code/*.gv *.html
48+
49+
# Harmony outputs in `modules` directory
4750
(cd harmony_model_checker/modules; rm -f *.htm *.hvm *.hco *.png *.hfa *.tla *.gv *.html)
51+
4852
rm -rf compiler_integration_results.md compiler_integration_results/
53+
54+
# Package publication related outputs
4955
rm -rf build/ dist/ harmony_model_checker.egg-info/
56+
57+
# Test coverage related outputs
58+
rm -rf .coverage htmlcov

tests/e2e/test_compilation.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def load_harmony_files() -> List[Params]:
1717
return [
1818
Params(
1919
filename=f,
20-
max_time=timedelta(milliseconds=500)
20+
max_time=timedelta(seconds=1)
2121
) for f in code_dir.glob("*.hny")
2222
]
2323

@@ -38,4 +38,5 @@ def test_compilation(param):
3838
start_time = time.perf_counter_ns()
3939
do_compile(str(param.filename), consts=[], mods=[], interface=None)
4040
end_time = time.perf_counter_ns()
41-
assert end_time - start_time <= param.max_time.microseconds * 1000
41+
duration = end_time - start_time
42+
assert duration <= param.max_time.total_seconds() * 1e9

0 commit comments

Comments
 (0)