|
| 1 | +import os |
| 2 | + |
1 | 3 | from pathlib import Path
|
2 | 4 | from pyfpga.factory import Factory
|
3 | 5 |
|
@@ -41,7 +43,7 @@ def test_quartus():
|
41 | 43 | generate(tool, 'PARTNAME')
|
42 | 44 | base = f'results/{tool}/{tool}'
|
43 | 45 | assert Path(f'{base}.tcl').exists(), 'file not found'
|
44 |
| - assert Path(f'{base}-prog.tcl').exists(), 'file not found' |
| 46 | + assert Path(f'{base}-prog.sh').exists(), 'file not found' |
45 | 47 |
|
46 | 48 |
|
47 | 49 | def test_vivado():
|
@@ -88,11 +90,15 @@ def generate(tool, part):
|
88 | 90 | prj.make()
|
89 | 91 | prj.prog()
|
90 | 92 | #
|
| 93 | + separator = '\\' |
| 94 | + # |
91 | 95 | for path in prj.data['includes']:
|
92 |
| - assert "\\" not in path, f'invalid path {path}' |
| 96 | + assert separator not in path, f'invalid path {path}' |
93 | 97 | for category in ['files', 'constraints']:
|
94 | 98 | for path in prj.data[category]:
|
95 |
| - assert "\\" not in path, f'invalid path {path}' |
| 99 | + assert separator not in path, f'invalid path {path}' |
96 | 100 | #
|
| 101 | + if os.name == 'nt' and tool in ['diamond', 'quartus']: |
| 102 | + separator = '/' |
97 | 103 | path = prj._get_bitstream()
|
98 |
| - assert "\\" not in path, f'invalid path {path}' |
| 104 | + assert separator not in path, f'invalid path {path}' |
0 commit comments