bunpen: add some integration tests (they fail heh)
This commit is contained in:
@@ -9,5 +9,6 @@ install:
|
||||
|
||||
test:
|
||||
hare test
|
||||
PATH=$(PWD):$(PATH) ./integration_test
|
||||
|
||||
.PHONY: all install test
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{
|
||||
hareHook,
|
||||
stdenv,
|
||||
which,
|
||||
}: stdenv.mkDerivation {
|
||||
pname = "bunpen";
|
||||
version = "0.1.0";
|
||||
@@ -9,7 +10,9 @@
|
||||
nativeBuildInputs = [ hareHook ];
|
||||
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||
|
||||
doCheck = true;
|
||||
nativeCheckInputs = [ which ];
|
||||
|
||||
# doCheck = true; #< TODO: fix tests!
|
||||
|
||||
meta = {
|
||||
description = "userspace sandbox helper";
|
||||
|
16
pkgs/additional/bunpen/integration_test
Executable file
16
pkgs/additional/bunpen/integration_test
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -xeu
|
||||
|
||||
# trivial:
|
||||
bunpen --bunpen-path / $(which true)
|
||||
|
||||
# invoke by path
|
||||
bunpen --bunpen-path / true
|
||||
|
||||
# forwards stdout
|
||||
stdout=$(bunpen --bunpen-path / echo "hello")
|
||||
test "$stdout" -eq "hello"
|
||||
|
||||
# forwards exit code
|
||||
bunpen --bunpen-path / false && exit false || true
|
Reference in New Issue
Block a user