test: wrappers without F4PGA_INSTALL_DIR (exception expected)
+from os import environ
from pytest import mark
from sys import stdout, stderr
from subprocess import check_call
-@mark.xfail
-@mark.parametrize(
- "wrapper",
- [
+wrappers = [
'symbiflow_generate_constraints',
'symbiflow_pack',
'symbiflow_place',
@@ -23,6 +21,11 @@ from subprocess import check_call
'symbiflow_generate_libfile',
'ql_symbiflow'
]
+
+@mark.xfail
+@mark.parametrize(
+ "wrapper",
+ wrappers
)
def test_shell_wrapper(wrapper):
print(f"\n::group::Test {wrapper}")
@@ -32,3 +35,20 @@ def test_shell_wrapper(wrapper):
check_call(f"{wrapper}")
finally:
print("\n::endgroup::")
+
+@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::")
