bunpen: add some integration tests (they fail heh)
This commit is contained in:
@@ -9,5 +9,6 @@ install:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
hare test
|
hare test
|
||||||
|
PATH=$(PWD):$(PATH) ./integration_test
|
||||||
|
|
||||||
.PHONY: all install test
|
.PHONY: all install test
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
hareHook,
|
hareHook,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
which,
|
||||||
}: stdenv.mkDerivation {
|
}: stdenv.mkDerivation {
|
||||||
pname = "bunpen";
|
pname = "bunpen";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
@@ -9,7 +10,9 @@
|
|||||||
nativeBuildInputs = [ hareHook ];
|
nativeBuildInputs = [ hareHook ];
|
||||||
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
makeFlags = [ "PREFIX=${builtins.placeholder "out"}" ];
|
||||||
|
|
||||||
doCheck = true;
|
nativeCheckInputs = [ which ];
|
||||||
|
|
||||||
|
# doCheck = true; #< TODO: fix tests!
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "userspace sandbox helper";
|
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