From 4cde04f476fa0f61680f8e53fe81cc70923689fc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 20 Nov 2017 18:36:36 +0100 Subject: [PATCH] Add tests for "nix run" --- tests/local.mk | 3 ++- tests/run.nix | 17 +++++++++++++++++ tests/run.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 tests/run.nix create mode 100644 tests/run.sh diff --git a/tests/local.mk b/tests/local.mk index 2b92ec4e5..baf74224b 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -18,7 +18,8 @@ nix_tests = \ structured-attrs.sh \ fetchGit.sh \ fetchMercurial.sh \ - signing.sh + signing.sh \ + run.sh # parallel.sh install-tests += $(foreach x, $(nix_tests), tests/$(x)) diff --git a/tests/run.nix b/tests/run.nix new file mode 100644 index 000000000..77dcbd2a9 --- /dev/null +++ b/tests/run.nix @@ -0,0 +1,17 @@ +with import ./config.nix; + +{ + hello = mkDerivation { + name = "hello"; + buildCommand = + '' + mkdir -p $out/bin + cat > $out/bin/hello <