def setup_class(cls, derived_cls, filename_of_test_class): AwsFpgaTestBase.s3_bucket = 'aws-fpga-jenkins-testing' AwsFpgaTestBase.__ec2_client = None AwsFpgaTestBase.__s3_client = None AwsFpgaTestBase.test_dir = dirname(realpath(filename_of_test_class)) # SDAccel locations # Need to move to either a config file somewhere or a subclass AwsFpgaTestBase.xilinx_sdaccel_examples_prefix_path = "SDAccel/examples/xilinx" AwsFpgaTestBase.xilinx_sdaccel_examples_dir = AwsFpgaTestBase.git_repo_dir + "/" + AwsFpgaTestBase.xilinx_sdaccel_examples_prefix_path AwsFpgaTestBase.xilinx_sdaccel_examples_list_file = AwsFpgaTestBase.WORKSPACE + "/sdaccel_examples_list.json" # Vitis locations # Need to move to either a config file somewhere or a subclass AwsFpgaTestBase.xilinx_vitis_examples_prefix_path = "Vitis/examples/xilinx" AwsFpgaTestBase.xilinx_vitis_examples_dir = AwsFpgaTestBase.git_repo_dir + "/" + AwsFpgaTestBase.xilinx_vitis_examples_prefix_path AwsFpgaTestBase.xilinx_vitis_examples_list_file = AwsFpgaTestBase.WORKSPACE + "/vitis_examples_list.json" if 'WORKSPACE' in os.environ: assert os.environ[ 'WORKSPACE'] == AwsFpgaTestBase.git_repo_dir, "WORKSPACE incorrect" else: os.environ['WORKSPACE'] = AwsFpgaTestBase.WORKSPACE if 'BUILD_TAG' not in os.environ: os.environ['BUILD_TAG'] = 'test' logger.info('Set BUILD_TAG to {}'.format(os.environ['BUILD_TAG'])) AwsFpgaTestBase.instance_type = aws_fpga_test_utils.get_instance_type() AwsFpgaTestBase.num_slots = aws_fpga_test_utils.get_num_fpga_slots( AwsFpgaTestBase.instance_type) return
def setup_class(cls, derived_cls, filename_of_test_class): AwsFpgaTestBase.s3_bucket = 'aws-fpga-jenkins-testing' AwsFpgaTestBase.__ec2_client = None AwsFpgaTestBase.__s3_client = None AwsFpgaTestBase.test_dir = dirname(realpath(filename_of_test_class)) AwsFpgaTestBase.git_repo_dir = get_git_repo_root(dirname(filename_of_test_class)) AwsFpgaTestBase.WORKSPACE = AwsFpgaTestBase.git_repo_dir # SDAccel locations # Need to move to either a config file somewhere or a subclass AwsFpgaTestBase.xilinx_sdaccel_examples_dir = AwsFpgaTestBase.git_repo_dir + "/SDAccel/examples/xilinx" AwsFpgaTestBase.xilinx_sdaccel_examples_list_file = AwsFpgaTestBase.WORKSPACE + "/sdaccel_examples_list.json" if 'WORKSPACE' in os.environ: assert os.environ['WORKSPACE'] == AwsFpgaTestBase.git_repo_dir, "WORKSPACE incorrect" else: os.environ['WORKSPACE'] = AwsFpgaTestBase.WORKSPACE AwsFpgaTestBase.instance_type = aws_fpga_test_utils.get_instance_type() AwsFpgaTestBase.num_slots = aws_fpga_test_utils.get_num_fpga_slots(AwsFpgaTestBase.instance_type) return