def test_core_info(): tests_dir = os.path.dirname(__file__) cores_root = os.path.join(tests_dir, 'cores') for core_name in ['sockit', 'mor1kx-generic']: core = Core(os.path.join(cores_root, core_name, core_name+'.core')) gen_info = '\n'.join([x for x in core.info().split('\n') if not 'Core root' in x]) with open(os.path.join(tests_dir, __name__, core_name+".info")) as f: assert f.read() == gen_info, core_name
def test_core_info(): tests_dir = os.path.dirname(__file__) cores_root = os.path.join(tests_dir, "cores") for core_name in ["sockit", "mor1kx-generic"]: core = Core(os.path.join(cores_root, core_name, core_name + ".core")) gen_info = "\n".join( [x for x in core.info().split("\n") if not "Core root" in x]) with open(os.path.join(tests_dir, __name__, core_name + ".info")) as f: assert f.read() == gen_info, core_name
def test_core_info(): tests_dir = os.path.dirname(__file__) cores_root = os.path.join(tests_dir, 'cores') for core_name in ['sockit', 'mor1kx-generic']: core = Core(os.path.join(cores_root, core_name, core_name + '.core')) gen_info = '\n'.join( [x for x in core.info().split('\n') if not 'Core root' in x]) with open(os.path.join(tests_dir, __name__, core_name + ".info")) as f: assert f.read() == gen_info, core_name
def test_capi2_info(): from fusesoc.core import Core for core_name in ['targets']: core_file = os.path.join(tests_dir, "capi2_cores", "misc", core_name + '.core') core = Core(core_file, None, None) gen_info = '\n'.join( [x for x in core.info().split('\n') if not 'Core root' in x]) with open(os.path.join(tests_dir, __name__, core_name + ".info")) as f: assert f.read() == gen_info, core_name
def test_capi2_info(): from fusesoc.core import Core for core_name in ["targets", "generators"]: core_file = os.path.join(tests_dir, "capi2_cores", "misc", core_name + ".core") core = Core(core_file) gen_info = "\n".join( [x for x in core.info().split("\n") if not "Core root" in x]) with open(os.path.join(tests_dir, __name__, core_name + ".info")) as f: assert f.read() == gen_info, core_name
def test_capi2_info(): from fusesoc.core import Core for core_name in ['targets']: core_file = os.path.join(tests_dir, "capi2_cores", "misc", core_name+'.core') core = Core(core_file) gen_info = '\n'.join([x for x in core.info().split('\n') if not 'Core root' in x]) with open(os.path.join(tests_dir, __name__, core_name+".info")) as f: assert f.read() == gen_info, core_name