Skip to content

Commit

Permalink
Make building OpenOCD deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnbastiaan committed Mar 13, 2024
1 parent 9c4ad84 commit 013033c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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

0 comments on commit 013033c

Please sign in to comment.