From 644acd50024cc3a05c17113b0051be9390dcd55c Mon Sep 17 00:00:00 2001 From: Brendan Hay Date: Wed, 4 Nov 2020 20:15:50 +0100 Subject: [PATCH] build: ensure urbit tests are run with the -g argument --- nix/lib/boot-fake-ship.nix | 10 +++++++--- nix/lib/test-fake-ship.nix | 6 ++++-- nix/pkgs/urbit/default.nix | 5 ++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/nix/lib/boot-fake-ship.nix b/nix/lib/boot-fake-ship.nix index 93adb27eb..48917b63e 100644 --- a/nix/lib/boot-fake-ship.nix +++ b/nix/lib/boot-fake-ship.nix @@ -1,4 +1,4 @@ -{ stdenvNoCC, cacert }: +{ lib, stdenvNoCC, cacert }: { urbit, herb, arvo ? null, pill, ship }: @@ -22,9 +22,13 @@ stdenvNoCC.mkDerivation { set -xeuo pipefail if [ -z "$ARVO" ]; then - urbit -d -F "$SHIP" -B "$PILL" ./pier + urbit ${ + lib.concatStringsSep " " urbit.meta.arguments + } -d -F "$SHIP" -B "$PILL" ./pier else - urbit -d -F "$SHIP" -A "$ARVO" -B "$PILL" ./pier + urbit ${ + lib.concatStringsSep " " urbit.meta.arguments + } -d -F "$SHIP" -A "$ARVO" -B "$PILL" ./pier fi cleanup () { diff --git a/nix/lib/test-fake-ship.nix b/nix/lib/test-fake-ship.nix index 4e722210f..a82fc7bca 100644 --- a/nix/lib/test-fake-ship.nix +++ b/nix/lib/test-fake-ship.nix @@ -1,4 +1,4 @@ -{ stdenvNoCC, cacert, python3, bootFakeShip }: +{ lib, stdenvNoCC, cacert, python3, bootFakeShip }: { urbit, herb, arvo ? null, pill, ship ? "bus", doCheck ? true }: @@ -19,7 +19,9 @@ stdenvNoCC.mkDerivation { buildPhase = '' set -x - urbit -d ./pier 2> urbit-output + urbit ${ + lib.concatStringsSep " " urbit.meta.arguments + } -d ./pier 2> urbit-output # Sledge Hammer! # See: https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959 diff --git a/nix/pkgs/urbit/default.nix b/nix/pkgs/urbit/default.nix index 5b54caf6b..d31579d99 100644 --- a/nix/pkgs/urbit/default.nix +++ b/nix/pkgs/urbit/default.nix @@ -75,5 +75,8 @@ in stdenv.mkDerivation { inherit enableParallelBuilding doCheck dontStrip; - meta = { debug = enableDebug; }; + meta = { + debug = enableDebug; + arguments = lib.optionals enableDebug [ "-g" ]; + }; }