2022-05-30 10:21:52 -04:00
|
|
|
from os import environ
|
2022-03-17 23:09:00 -04:00
|
|
|
from pytest import mark
|
|
|
|
from sys import stdout, stderr
|
|
|
|
|
|
|
|
from subprocess import check_call
|
|
|
|
|
|
|
|
|
2022-05-30 10:21:52 -04:00
|
|
|
wrappers = [
|
|
|
|
'symbiflow_generate_constraints',
|
|
|
|
'symbiflow_pack',
|
|
|
|
'symbiflow_place',
|
|
|
|
'symbiflow_route',
|
|
|
|
'symbiflow_synth',
|
|
|
|
'symbiflow_write_bitstream',
|
|
|
|
'symbiflow_write_fasm',
|
|
|
|
'symbiflow_write_xml_rr_graph',
|
|
|
|
'vpr_common',
|
|
|
|
'symbiflow_analysis',
|
|
|
|
'symbiflow_repack',
|
|
|
|
'symbiflow_generate_bitstream',
|
|
|
|
'symbiflow_generate_libfile',
|
|
|
|
'ql_symbiflow'
|
|
|
|
]
|
|
|
|
|
2022-03-17 23:09:00 -04:00
|
|
|
@mark.xfail
|
|
|
|
@mark.parametrize(
|
|
|
|
"wrapper",
|
2022-05-30 10:21:52 -04:00
|
|
|
wrappers
|
2022-03-17 23:09:00 -04:00
|
|
|
)
|
|
|
|
def test_shell_wrapper(wrapper):
|
|
|
|
print(f"\n::group::Test {wrapper}")
|
|
|
|
stdout.flush()
|
|
|
|
stderr.flush()
|
|
|
|
try:
|
|
|
|
check_call(f"{wrapper}")
|
|
|
|
finally:
|
|
|
|
print("\n::endgroup::")
|
2022-05-30 10:21:52 -04:00
|
|
|
|
|
|
|
@mark.xfail
|
|
|
|
@mark.parametrize(
|
|
|
|
"wrapper",
|
|
|
|
wrappers
|
|
|
|
)
|
|
|
|
def test_shell_wrapper_without_F4PGA_INSTALL_DIR(wrapper):
|
|
|
|
test_environ = environ.copy()
|
|
|
|
del test_environ['F4PGA_INSTALL_DIR']
|
|
|
|
|
|
|
|
print(f"\n::group::Test {wrapper}")
|
|
|
|
stdout.flush()
|
|
|
|
stderr.flush()
|
|
|
|
try:
|
|
|
|
check_call(f"{wrapper}", env=test_environ)
|
|
|
|
finally:
|
|
|
|
print("\n::endgroup::")
|