Skip to content

Commit

Permalink
eth: Fix testbenches
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Forencich <alex@alexforencich.com>
  • Loading branch information
alexforencich committed Feb 26, 2025
1 parent 01f836a commit 07d75f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions tb/eth/taxi_eth_mac_10g_fifo/test_taxi_eth_mac_10g_fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,16 @@ def cycle_en():


def process_f_files(files):
lst = []
lst = {}
for f in files:
if f[-2:].lower() == '.f':
with open(f, 'r') as fp:
l = fp.read().split()
lst.extend(process_f_files([os.path.join(os.path.dirname(f), x) for x in l]))
for f in process_f_files([os.path.join(os.path.dirname(f), x) for x in l]):
lst[os.path.basename(f)] = f
else:
lst.append(f)
return list(dict.fromkeys(lst))
lst[os.path.basename(f)] = f
return list(lst.values())


@pytest.mark.parametrize("dic_en", [1, 0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,16 @@ def cycle_en():


def process_f_files(files):
lst = []
lst = {}
for f in files:
if f[-2:].lower() == '.f':
with open(f, 'r') as fp:
l = fp.read().split()
lst.extend(process_f_files([os.path.join(os.path.dirname(f), x) for x in l]))
for f in process_f_files([os.path.join(os.path.dirname(f), x) for x in l]):
lst[os.path.basename(f)] = f
else:
lst.append(f)
return list(dict.fromkeys(lst))
lst[os.path.basename(f)] = f
return list(lst.values())


@pytest.mark.parametrize("dic_en", [1, 0])
Expand Down

0 comments on commit 07d75f2

Please sign in to comment.