From 921b838149492fe1ec55384715f5f94ad454fa3b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 31 Aug 2009 13:40:57 +0000 Subject: [PATCH] * test -> tests. svn path=/nixos/trunk/; revision=16897 --- .../installer/cd-dvd/installation-cd-base.nix | 2 ++ .../web-servers/apache-httpd/default.nix | 2 ++ modules/testing/test-instrumentation.nix | 36 +++++++++++++++++++ .../remote-install-scripts/install-launch.sh | 0 .../remote-install-scripts/install-script.sh | 0 .../remote-install-scripts/install-start.sh | 0 .../remote-install-scripts/install-test.sh | 0 {test => tests}/test-config-examples.sh | 0 {test => tests}/test-upstart-job.sh | 0 9 files changed, 40 insertions(+) create mode 100644 modules/testing/test-instrumentation.nix rename {test => tests}/remote-install-scripts/install-launch.sh (100%) rename {test => tests}/remote-install-scripts/install-script.sh (100%) rename {test => tests}/remote-install-scripts/install-start.sh (100%) rename {test => tests}/remote-install-scripts/install-test.sh (100%) rename {test => tests}/test-config-examples.sh (100%) rename {test => tests}/test-upstart-job.sh (100%) diff --git a/modules/installer/cd-dvd/installation-cd-base.nix b/modules/installer/cd-dvd/installation-cd-base.nix index 83fd1423ef1..3613ccb1613 100644 --- a/modules/installer/cd-dvd/installation-cd-base.nix +++ b/modules/installer/cd-dvd/installation-cd-base.nix @@ -155,6 +155,7 @@ in # installation. installer.nixpkgsURL = http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable; + /* boot.postBootCommands = '' export PATH=${pkgs.gnutar}/bin:${pkgs.bzip2}/bin:$PATH @@ -176,6 +177,7 @@ in # running system on the CD/DVD. cp ${dummyConfiguration} /etc/nixos/configuration.nix ''; + */ # Some more help text. services.mingetty.helpLine = diff --git a/modules/services/web-servers/apache-httpd/default.nix b/modules/services/web-servers/apache-httpd/default.nix index 561a911439e..66019a9b00e 100644 --- a/modules/services/web-servers/apache-httpd/default.nix +++ b/modules/services/web-servers/apache-httpd/default.nix @@ -606,6 +606,8 @@ in in concatMapStrings f (concatMap (svc: svc.globalEnvVars) allSubservices) } + env GCOV_PREFIX=/tmp/coverage-data + env PATH=${pkgs.coreutils}/bin:${pkgs.gnugrep}/bin:${concatStringsSep ":" (concatMap (svc: svc.extraServerPath) allSubservices)} respawn ${httpd}/bin/httpd -f ${httpdConf} -DNO_DETACH diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix new file mode 100644 index 00000000000..b64dc70ab30 --- /dev/null +++ b/modules/testing/test-instrumentation.nix @@ -0,0 +1,36 @@ +# This module allows the test driver to connect to the virtual machine +# via a root shell attached to port 514. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + config = { + + jobs = singleton + { name = "backdoor"; + + startOn = "network-interfaces"; + + preStart = + '' + eval $(cat /proc/cmdline) + echo "guest running, will write in $hostTmpDir on host" > /dev/ttyS0 + touch /hostfs/$hostTmpDir/running + ''; + + exec = "${pkgs.socat}/bin/socat tcp-listen:514,fork exec:/bin/sh,stderr"; + }; + + boot.postBootCommands = + '' + ( eval $(cat /proc/cmdline) + mkdir /hostfs/$hostTmpDir/coverage-data + ln -s /hostfs/$hostTmpDir/coverage-data /tmp/coverage-data + ) + ''; + }; + +} diff --git a/test/remote-install-scripts/install-launch.sh b/tests/remote-install-scripts/install-launch.sh similarity index 100% rename from test/remote-install-scripts/install-launch.sh rename to tests/remote-install-scripts/install-launch.sh diff --git a/test/remote-install-scripts/install-script.sh b/tests/remote-install-scripts/install-script.sh similarity index 100% rename from test/remote-install-scripts/install-script.sh rename to tests/remote-install-scripts/install-script.sh diff --git a/test/remote-install-scripts/install-start.sh b/tests/remote-install-scripts/install-start.sh similarity index 100% rename from test/remote-install-scripts/install-start.sh rename to tests/remote-install-scripts/install-start.sh diff --git a/test/remote-install-scripts/install-test.sh b/tests/remote-install-scripts/install-test.sh similarity index 100% rename from test/remote-install-scripts/install-test.sh rename to tests/remote-install-scripts/install-test.sh diff --git a/test/test-config-examples.sh b/tests/test-config-examples.sh similarity index 100% rename from test/test-config-examples.sh rename to tests/test-config-examples.sh diff --git a/test/test-upstart-job.sh b/tests/test-upstart-job.sh similarity index 100% rename from test/test-upstart-job.sh rename to tests/test-upstart-job.sh