Skip to content

Commit

Permalink
Try to create bin directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jun 18, 2024
1 parent a7b6cc2 commit 32e1057
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/unit/GHDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ class CommonOptions(TestCase, Helper):
def setUpClass(cls) -> None:
# print(f"\nPlatform: {sys_platform}")
if sys_platform in ("linux", "darwin"):
if not cls._binaryDirectoryPath.exists():
print(f"Creating bin directory '{cls._binaryDirectoryPath}': ", end="")
cls._binaryDirectoryPath.mkdir(parents=True)
print(f"DONE" if cls._binaryDirectoryPath.exists() and cls._binaryDirectoryPath.is_dir() else f"FAILED")
ghdlBinaryPath: Path = cls._binaryDirectoryPath / "ghdl"
print(f"Creating dummy file '{ghdlBinaryPath}': ", end="")
ghdlBinaryPath.touch()
print(f"DONE" if ghdlBinaryPath.exists() else f"FAILED")
print(f"DONE" if ghdlBinaryPath.exists() and ghdlBinaryPath.is_file() else f"FAILED")

def test_Help(self) -> None:
print()
Expand Down Expand Up @@ -83,10 +87,14 @@ class Analyze(TestCase, Helper):
def setUpClass(cls) -> None:
# print(f"\nPlatform: {sys_platform}")
if sys_platform in ("linux", "darwin"):
if not cls._binaryDirectoryPath.exists():
print(f"Creating bin directory '{cls._binaryDirectoryPath}': ", end="")
cls._binaryDirectoryPath.mkdir(parents=True)
print(f"DONE" if cls._binaryDirectoryPath.exists() and cls._binaryDirectoryPath.is_dir() else f"FAILED")
ghdlBinaryPath: Path = cls._binaryDirectoryPath / "ghdl"
print(f"Creating dummy file '{ghdlBinaryPath}': ", end="")
ghdlBinaryPath.touch()
print(f"DONE" if ghdlBinaryPath.exists() else f"FAILED")
print(f"DONE" if ghdlBinaryPath.exists() and ghdlBinaryPath.is_file() else f"FAILED")

def test_Analyze(self) -> None:
print()
Expand Down

0 comments on commit 32e1057

Please sign in to comment.