diff options
author | Antti Keränen <detegr@rbx.email> | 2023-05-16 09:02:35 +0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-05-21 10:35:57 -0300 |
commit | a81af31b38fcc4b6070356990483c9b1b966285d (patch) | |
tree | fb63a45fac6f0534fc548645d52c39e50eb01ba5 /pkgs/development/interpreters | |
parent | bf17936bdf8e11420f92402bc24eab171a2131ac (diff) |
cbqn: run test suite in installCheckPhase
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r-- | pkgs/development/interpreters/bqn/cbqn/default.nix | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/bqn/cbqn/default.nix b/pkgs/development/interpreters/bqn/cbqn/default.nix index a6e8f4c9feb99..f455be743127b 100644 --- a/pkgs/development/interpreters/bqn/cbqn/default.nix +++ b/pkgs/development/interpreters/bqn/cbqn/default.nix @@ -6,7 +6,7 @@ , fixDarwinDylibNames , genBytecode ? false , bqn-path ? null -, mbqn-source ? null +, mbqn-source , enableReplxx ? false , enableSingeli ? stdenv.hostPlatform.avx2Support , enableLibcbqn ? ((stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) && !enableReplxx) @@ -42,6 +42,7 @@ stdenv.mkDerivation rec { ]; dontConfigure = true; + doInstallCheck = true; postPatch = '' sed -i '/SHELL =.*/ d' makefile @@ -100,6 +101,26 @@ stdenv.mkDerivation rec { runHook postInstall ''; + installCheckPhase = '' + runHook preInstallCheck + + # main test suite from mlochbaum/BQN + $out/bin/BQN ${mbqn-source}/test/this.bqn + + # CBQN tests that do not require compiling with test-only flags + $out/bin/BQN test/cmp.bqn + $out/bin/BQN test/equal.bqn + $out/bin/BQN test/copy.bqn + $out/bin/BQN test/bit.bqn + $out/bin/BQN test/hash.bqn + $out/bin/BQN test/squeezeValid.bqn + $out/bin/BQN test/squeezeExact.bqn + $out/bin/BQN test/various.bqn + $out/bin/BQN test/random.bqn + + runHook postInstallCheck + ''; + meta = with lib; { homepage = "https://github.com/dzaima/CBQN/"; description = "BQN implementation in C"; @@ -108,4 +129,3 @@ stdenv.mkDerivation rec { platforms = platforms.all; }; } -# TODO: test suite |