Commit 59c5aa66 authored by Valentin Reis's avatar Valentin Reis

refactoring tests to be able to launch from external repo.

parent 4c2bdeef
Pipeline #4583 passed with stage
in 6 seconds
stages:
- test
nix.test:
integration.test:
stage: test
script:
- ./tests.hs
- ./integration.sh
except:
- /^wip\/.*/
- /^WIP\/.*/
......
......@@ -56,14 +56,14 @@ instance Default StackArgs where
{ dargs = ""
, app = "echo Dummy app: Hello world!"
, manifest = "manifests/basic.json"
, cmd_out = "/tmp/cmd_out.log"
, cmd_err = "/tmp/cmd_err.log"
, daemon_out = "/tmp/daemon_out.log"
, daemon_err = "/tmp/daemon_err.log"
, log_progress = "/tmp/progress.log"
, log_hardwareprogress = "/tmp/hardwareprogress.log"
, log_power = "/tmp/power.log"
, time_file = "/tmp/time.log"
, cmd_out = "cmd_out.log"
, cmd_err = "cmd_err.log"
, daemon_out = "daemon_out.log"
, daemon_err = "daemon_err.log"
, log_progress = "progress.log"
, log_hardwareprogress = "hardwareprogress.log"
, log_power = "power.log"
, time_file = "time.log"
}
......
......@@ -30,7 +30,13 @@ in rec
];
};
test = env.overrideAttrs(old: {
src = ./.;
buildInputs = old.buildInputs ++ [ (argopkgs.haskellPackages.ghcWithPackages hpkgs) ];
buildPhase = "runhaskell integration.hs";
installPhase = ''
mkdir -p $out/bin
cp cmd_out.log cmd_err.log daemon_out.log daemon_err.log progress.log hardwareprogress.log power.log time.log $out/bin
'';
});
dev = env.overrideAttrs(old: {
buildInputs = old.buildInputs ++ [ (argopkgs.haskellPackages.ghcWithHoogle hpkgs-dev) ];
......
#! /usr/bin/env nix-shell
#! nix-shell default.nix -i runhaskell -A test
#! /usr/bin/env runhaskell
import Argotest
import Data.Default
......
#! /usr/bin/env bash
nix-shell --pure -A test --command ./integration.hs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment