fix dependency handling for tests
Some checks failed
ci/woodpecker/pr/debug Pipeline was successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/deployment/debug Pipeline was successful
ci/woodpecker/deployment/release/3 Pipeline failed
ci/woodpecker/deployment/release/1 Pipeline failed
ci/woodpecker/deployment/release/2 Pipeline failed
ci/woodpecker/deployment/release/4 Pipeline failed
ci/woodpecker/deployment/publish unknown status
Some checks failed
ci/woodpecker/pr/debug Pipeline was successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/deployment/debug Pipeline was successful
ci/woodpecker/deployment/release/3 Pipeline failed
ci/woodpecker/deployment/release/1 Pipeline failed
ci/woodpecker/deployment/release/2 Pipeline failed
ci/woodpecker/deployment/release/4 Pipeline failed
ci/woodpecker/deployment/publish unknown status
This commit is contained in:
parent
c4ba50a94a
commit
6228f735ef
1 changed files with 7 additions and 13 deletions
|
@ -116,6 +116,7 @@ let
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
cargoExtraArgs = "--locked --features ${featuresStr}";
|
cargoExtraArgs = "--locked --features ${featuresStr}";
|
||||||
|
cargoTestExtraArgs = "--workspace";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgsNative.protobuf
|
pkgsNative.protobuf
|
||||||
|
@ -143,12 +144,6 @@ let
|
||||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER = "clang";
|
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER = "clang";
|
||||||
});
|
});
|
||||||
|
|
||||||
testArgs = commonArgs // {
|
|
||||||
pname = "garage-tests";
|
|
||||||
cargoExtraArgs = "${commonArgs.cargoExtraArgs} --tests --workspace";
|
|
||||||
CARGO_PROFILE = "test";
|
|
||||||
};
|
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
toolchain = toolchainFn pkgs;
|
toolchain = toolchainFn pkgs;
|
||||||
|
|
||||||
|
@ -178,18 +173,17 @@ in rec {
|
||||||
|
|
||||||
# ---- testing garage ----
|
# ---- testing garage ----
|
||||||
|
|
||||||
garage-test-deps = craneLib.buildDepsOnly testArgs;
|
garage-test-bin = craneLib.cargoBuild (commonArgs // {
|
||||||
# cargoArtifacts = garage would do nothing for this derivation
|
cargoArtifacts = garage-deps;
|
||||||
# because it's not the same profile
|
|
||||||
# this is a truly independent build
|
|
||||||
|
|
||||||
garage-test-bin = craneLib.cargoBuild (testArgs // {
|
pname = "garage-tests";
|
||||||
cargoArtifacts = garage-test-deps;
|
|
||||||
|
|
||||||
|
CARGO_PROFILE = "test";
|
||||||
|
cargoExtraArgs = "${commonArgs.cargoExtraArgs} --tests --workspace";
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
garage-test = craneLib.cargoTest (testArgs // {
|
garage-test = craneLib.cargoTest (commonArgs // {
|
||||||
cargoArtifacts = garage-test-bin;
|
cargoArtifacts = garage-test-bin;
|
||||||
nativeBuildInputs = commonArgs.nativeBuildInputs ++ [
|
nativeBuildInputs = commonArgs.nativeBuildInputs ++ [
|
||||||
pkgs.cacert
|
pkgs.cacert
|
||||||
|
|
Loading…
Add table
Reference in a new issue