Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make building OpenOCD deterministic #23

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion clash-vexriscv-sim/tests/tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import Test.Tasty.HUnit (Assertion, testCase, (@?=))
import Utils.ProgramLoad (loadProgramDmem)
import Utils.Cpu (cpu)

-- XXX: Disabled, we need to add OpenOCD + GDB to CI (or use the Nix shell?)
-- import qualified Tests.Jtag

runProgramExpect ::
-- | action to copy ELF file
Expand Down Expand Up @@ -130,7 +132,7 @@ main = do
[ testGroup "Debug builds" debugTestCases
, testGroup "Release builds" releaseTestCases
-- XXX: Disabled, we need to add OpenOCD + GDB to CI (or use the Nix shell?)
-- , Jtag.tests
-- , Tests.Jtag.tests
]

defaultMain tests
8 changes: 7 additions & 1 deletion nix/openocd-vexriscv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ pkgs.stdenv.mkDerivation rec {
src = pkgs.fetchgit {
url = "https://github.com/SpinalHDL/openocd_riscv.git";
rev = "058dfa50d625893bee9fecf8d604141911fac125";
sha256 = "sha256-5BvR45A3/7NqivQpYwaFnu7ra/Rf8giRig8R3zSYVd8=";
sha256 = "sha256-UuX4Zfr9DiJx60nvBAv+9xCbWXExrk5KNSC5V5e4rsw=";
fetchSubmodules = true;
deepClone = true;
postFetch = ''
# See: https://github.com/NixOS/nixpkgs/issues/8567#issuecomment-1846499599
find "$out/" -type d -name '.git' | xargs rm -rf
'';
};

installPhase = ''
Expand Down
Loading