gateware: create vcd_out directory by default

This commit is contained in:
David Lenfesty 2023-01-29 20:41:17 -07:00
parent ad3be1f4c7
commit 9997db0ac8
2 changed files with 7 additions and 2 deletions

1
gateware/.gitignore vendored
View File

@ -5,3 +5,4 @@ __pycache__
# Sim artifacts # Sim artifacts
*.vcd *.vcd
*.gtkw *.gtkw
vcd_out/

View File

@ -9,6 +9,7 @@ from minerva.core import Minerva
from typing import List from typing import List
from argparse import ArgumentParser from argparse import ArgumentParser
from pathlib import Path
import unittest import unittest
import sys import sys
import os import os
@ -151,7 +152,10 @@ if __name__ == "__main__":
if args.test: if args.test:
if args.save_vcd: if args.save_vcd:
os.environ.set("TEST_SAVE_VCD") if not Path("vcd_out").exists():
os.mkdir("vcd_out")
os.environ["TEST_SAVE_VCD"] = "YES"
# Super hacky... why am I doing this # Super hacky... why am I doing this
test_modules = [mod for mod in sys.modules if mod.startswith("test_")] test_modules = [mod for mod in sys.modules if mod.startswith("test_")]