From 6d9f4bf6500e5d993012bc00404196a85f328216 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 3 Aug 2024 07:01:08 +0200 Subject: [PATCH] Using GHDL_PREFIX. --- .github/workflows/Pipeline.yml | 14 +++++++++++++- tests/unit/GHDL.py | 5 +---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index b28a0f96..fde2ff7b 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -25,21 +25,33 @@ jobs: ubuntu_before_script: | which ghdl ghdl version - macos_before_script: | + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV" + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV + ls -lAh "$(realpath $(dirname $(which ghdl))/../lib/ghdl)" + macos_arm_before_script: | which ghdl ghdl version echo $(brew --prefix llvm@15) export DYLD_LIBRARY_PATH=$(brew --prefix llvm@15)/lib echo -$DYLD_LIBRARY_PATH- echo "DYLD_LIBRARY_PATH=$(brew --prefix llvm@15)/lib" >> $GITHUB_ENV + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV" + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV + ls -lAh "$(realpath $(dirname $(which ghdl))/../lib)" echo "----" ls $(brew --prefix llvm@15)/lib mingw64_before_script: | which ghdl ghdl version + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV" + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV +# ls -lAh "$(realpath $(dirname $(which ghdl))/../lib)" ucrt64_before_script: | which ghdl ghdl version + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV" + echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV +# ls -lAh "$(realpath $(dirname $(which ghdl))/../lib)" # ubuntu_before_script: sudo install -m 755 tests/mock/ghdl /usr/local/bin requirements: "-r tests/unit/requirements.txt" unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} diff --git a/tests/unit/GHDL.py b/tests/unit/GHDL.py index be85a1f4..ad95dd99 100644 --- a/tests/unit/GHDL.py +++ b/tests/unit/GHDL.py @@ -33,15 +33,12 @@ from pathlib import Path from unittest import TestCase -from pyTooling.Platform import CurrentPlatform - from pyEDAA.CLITool.GHDL import GHDL from . import Helper class GHDLTestcases(TestCase, Helper): - _libraryDirectoryPath = (Path(os_getenv("GHDL_PREFIX", default="/usr/lib/ghdl" if not CurrentPlatform.IsNativeMacOS else "/opt/homebrew/lib/ghdl")) / "../").resolve() - _binaryDirectoryPath = (Path(os_getenv("GHDL_PREFIX", default="/usr/lib/ghdl" if not CurrentPlatform.IsNativeMacOS else "/opt/homebrew/lib/ghdl")) / "../../bin").resolve() + _binaryDirectoryPath = (Path(os_getenv("GHDL_PREFIX", default="/usr/lib/ghdl")) / "../../bin").resolve() class CommonOptions(GHDLTestcases):