From 2835575ee48d4b9c9db81853dedace4caf85e3aa Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Mon, 28 Jun 2021 15:11:06 +0800 Subject: [PATCH] mcu: disable by-default `cargo test` checkPhase for Stabilizer --- mcu/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mcu/default.nix b/mcu/default.nix index cc58861..388fb97 100644 --- a/mcu/default.nix +++ b/mcu/default.nix @@ -8,7 +8,7 @@ let rustPlatform = pkgs.recurseIntoAttrs (pkgs.callPackage ./rustPlatform.nix { inherit rustManifest; }); - buildStm32Firmware = { name, src, patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", ... } @ args: + buildStm32Firmware = { name, src, patchPhase ? "", extraNativeBuildInputs ? [], checkPhase ? "", doCheck ? true, ... } @ args: let # If binaryName is specified as an arg of buildStm32Firmware, # then the .nix containing the cargoSha256 must be named "cargosha256-${binaryName}.nix"; @@ -37,7 +37,7 @@ let cargo build --release ''; - inherit checkPhase; + inherit checkPhase doCheck; installPhase = '' mkdir -p $out $out/nix-support cp target/thumbv7em-none-eabihf/release/${binaryName} $out/${name}.elf @@ -62,6 +62,7 @@ in --replace "Ipv4Address::new(10, 34, 16, 1)" \ "Ipv4Address::new(192, 168, 1, 1)" ''; + doCheck = false; }; thermostat = buildStm32Firmware { name = "thermostat";