diff --git a/tests/end2end/test_end2end_tfc.py b/tests/end2end/test_end2end_tfc.py index 002d82e327d694cbc0e1b65d66c0e81b5e7b313d..63e4f13c9fb3735749eec9bf9de42c817344e229 100644 --- a/tests/end2end/test_end2end_tfc.py +++ b/tests/end2end/test_end2end_tfc.py @@ -4,6 +4,7 @@ from pkgutil import get_data import pytest import numpy as np + # as of Feb'20 there is a bug that segfaults ONNX shape inference if we # import pytorch before onnx, so we make sure to import onnx first import onnx # NOQA @@ -171,7 +172,6 @@ def test_end2end_tfc_verify_all(): golden = ModelWrapper(build_dir + "/end2end_tfc_w1_a1_streamlined.onnx") iname = golden.graph.input[0].name oname = golden.graph.output[0].name - ishape = golden.get_tensor_shape(iname) raw_i = get_data("finn", "data/onnx/mnist-conv/test_data_set_0/input_0.pb") input_tensor = onnx.load_tensor_from_string(raw_i) x = nph.to_array(input_tensor) @@ -229,6 +229,8 @@ def test_end2end_tfc_deploy_on_pynq(): model = ModelWrapper(build_dir + "/end2end_tfc_w1_a1_pynq_driver.onnx") try: ip = os.environ["PYNQ_IP"] # no fault for this one; skip if not defined + if ip == "": + pytest.skip("PYNQ board IP address not specified") username = os.getenv("PYNQ_USERNAME", "xilinx") password = os.getenv("PYNQ_PASSWORD", "xilinx") target_dir = os.getenv("PYNQ_TARGET_DIR", "/home/xilinx/finn") @@ -244,7 +246,6 @@ def test_end2end_tfc_run_on_pynq(): golden = ModelWrapper(build_dir + "/end2end_tfc_w1_a1_streamlined.onnx") iname = golden.graph.input[0].name oname = golden.graph.output[0].name - ishape = golden.get_tensor_shape(iname) raw_i = get_data("finn", "data/onnx/mnist-conv/test_data_set_0/input_0.pb") input_tensor = onnx.load_tensor_from_string(raw_i) x = nph.to_array(input_tensor) @@ -259,6 +260,8 @@ def test_end2end_tfc_run_on_pynq(): oname = parent_model.graph.output[0].name try: ip = os.environ["PYNQ_IP"] # NOQA + if ip == "": + pytest.skip("PYNQ board IP address not specified") # produce results with npysim sdp_node = getCustomOp(parent_model.graph.node[2]) sdp_node.set_nodeattr( diff --git a/tests/fpgadataflow/test_fpgadataflow_ip_stitch.py b/tests/fpgadataflow/test_fpgadataflow_ip_stitch.py index 56664eb1d8613d49278f55ba68cbd7cb854bca32..d5ad340a09772d67c3601aad85a4c6cbd29f2cee 100644 --- a/tests/fpgadataflow/test_fpgadataflow_ip_stitch.py +++ b/tests/fpgadataflow/test_fpgadataflow_ip_stitch.py @@ -274,6 +274,8 @@ def test_fpgadataflow_ipstitch_pynq_deployment_folder(): ) try: ip = os.environ["PYNQ_IP"] # no default for this one; skip if not defined + if ip == "": + pytest.skip("PYNQ board IP address not specified") username = os.getenv("PYNQ_USERNAME", "xilinx") password = os.getenv("PYNQ_PASSWORD", "xilinx") target_dir = os.getenv("PYNQ_TARGET_DIR", "/home/xilinx/finn") @@ -305,6 +307,8 @@ def test_fpgadataflow_ipstitch_remote_execution(): ) try: ip = os.environ["PYNQ_IP"] # NOQA + if ip == "": + pytest.skip("PYNQ board IP address not specified") idt = DataType.INT2 x = gen_finn_dt_tensor(idt, (1, 4)) input_dict = {"inp": x}