78a65d6ec9
* Do tests with pytest to run them in parallel * attempt to handle merge commits better for PR test path Similar to how we solved this for travis * Clean up imports * don't run valgrind if not specified slow_test * Fix functest after initializer rename * upload tests results as junit * Upload test-common files since #200 got merged * Catch test results upload failure
29 rindas
602 B
Python
29 rindas
602 B
Python
import pytest
|
|
|
|
import helpers
|
|
import pqclean
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
'implementation',
|
|
pqclean.Scheme.all_implementations(),
|
|
ids=str,
|
|
)
|
|
@helpers.filtered_test
|
|
def test_format(implementation: pqclean.Implementation):
|
|
helpers.ensure_available('astyle')
|
|
cfiles = implementation.cfiles()
|
|
hfiles = implementation.hfiles()
|
|
result = helpers.run_subprocess(
|
|
['astyle',
|
|
'--dry-run',
|
|
'--options=../.astylerc',
|
|
*cfiles,
|
|
*hfiles])
|
|
assert 'Formatted' not in result
|
|
|
|
|
|
if __name__ == '__main__':
|
|
import sys
|
|
pytest.main(sys.argv)
|