Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit a1c9c2f

Browse files
committed
[DEVOPS-980] Disable set +e in integration tests for additional logic
1 parent 0351188 commit a1c9c2f

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ let
136136
shellcheck = pkgs.callPackage ./scripts/test/shellcheck.nix { inherit src; };
137137
hlint = pkgs.callPackage ./scripts/test/hlint.nix { inherit src; };
138138
stylishHaskell = pkgs.callPackage ./scripts/test/stylish.nix { inherit (cardanoPkgs) stylish-haskell; inherit src localLib; };
139-
walletIntegration = pkgs.callPackage ./scripts/test/wallet/integration/build-test.nix { inherit walletIntegrationTests pkgs; };
139+
walletIntegration = pkgs.callPackage ./scripts/test/wallet/integration/build-test.nix { inherit walletIntegrationTests; };
140140
swaggerSchemaValidation = pkgs.callPackage ./scripts/test/wallet/swaggerSchemaValidation.nix { inherit gitrev; };
141141
};
142142
cardano-sl-explorer-frontend = (import ./explorer/frontend {
+17-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
{pkgs, stdenv, walletIntegrationTests, glibcLocales }:
2-
stdenv.mkDerivation rec {
3-
name = "cardano-wallet-integration-tests";
4-
buildInputs = with pkgs; [ jq curl glibcLocales ];
5-
buildCommand = ''
6-
${walletIntegrationTests}
7-
EXIT_CODE=$?
8-
mkdir -pv $out/nix-support
9-
if [ $EXIT_CODE != 0 ]
10-
then
11-
touch $out/nix-support/failed
12-
tar -czvf $out/logs.tar.gz state-demo/logs
13-
echo "file binary-dist $out/logs.tar.gz" >> $out/nix-support/hydra-build-products
14-
fi
15-
'';
16-
1+
{stdenv, jq, curl, runCommand, walletIntegrationTests, glibcLocales }:
2+
runCommand "cardano-wallet-integration-tests" {
3+
buildInputs = [ jq curl glibcLocales ];
174
}
5+
''
6+
#!${stdenv.shell}
7+
function capture_logs {
8+
echo "The build failed with exit code $?"
9+
mkdir -pv $out/nix-support
10+
touch $out/nix-support/failed
11+
tar -czvf $out/logs.tar.gz state-demo/logs
12+
echo "file binary-dist $out/logs.tar.gz" >> $out/nix-support/hydra-build-products
13+
exit 0
14+
}
15+
${walletIntegrationTests} || capture_logs
16+
touch $out
17+
exit 0
18+
''

0 commit comments

Comments
 (0)