From e58635b1d2e2f7b6c0b9ff4bebebf7b0d1aab908 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 5 Aug 2016 00:03:41 +0200 Subject: s 2 buildbot: use make test for tests --- shared/2configs/shared-buildbot.nix | 43 +++++++++++++------------------------ 1 file changed, 15 insertions(+), 28 deletions(-) (limited to 'shared/2configs/shared-buildbot.nix') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index 688f8f9a..f1bd701f 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -91,37 +91,24 @@ ''; builder = { fast-tests = '' - f = util.BuildFactory() - f.addStep(grab_repo) - for i in [ "test-centos7", "wolf", "test-failing" ]: - addShell(f,name="populate-{}".format(i),env=env, - command=nixshell + \ - ["{}(make system={} populate debug=true)".format("!" if "failing" in i else "",i)]) + f = util.BuildFactory() + f.addStep(grab_repo) - # XXX we must prepare ./retiolum.rsa_key.priv for secrets to work - addShell(f,name="instantiate-test-all-modules",env=env, - command=nixshell + \ - ["touch retiolum.rsa_key.priv; \ - nix-instantiate \ - --show-trace --eval --strict --json \ - -I nixos-config=./shared/1systems/test-all-krebs-modules.nix \ - -I secrets=. \ - -A config.system.build.toplevel"] - ) + for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" "test-failing" ]: + addShell(f,name="build-{}".format(i),env=env, + command=nixshell + \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + make \ + test \ + target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ + method=eval \ + system={}".format(i)]) - addShell(f,name="build-test-minimal",env=env, - command=nixshell + \ - ["nix-instantiate \ - --show-trace --eval --strict --json \ - -I nixos-config=./shared/1systems/test-minimal-deploy.nix \ - -I secrets=. \ - -A config.system.build.toplevel"] - ) + bu.append(util.BuilderConfig(name="fast-tests", + slavenames=slavenames, + factory=f)) - bu.append(util.BuilderConfig(name="fast-tests", - slavenames=slavenames, - factory=f)) - ''; + ''; # this build will try to build against local nixpkgs # TODO change to do a 'local' populate and use the retrieved nixpkgs build-local = '' -- cgit v1.2.3 From d68b340b9b8acb717a6b4d5626600448ba7fd67a Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 5 Aug 2016 13:30:27 +0200 Subject: s: add dummy_secrets for tests --- shared/2configs/shared-buildbot.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shared/2configs/shared-buildbot.nix') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index f1bd701f..85e3cdf1 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -71,7 +71,11 @@ # prepare grab_repo step for stockholm grab_repo = steps.Git(repourl=stockholm_repo, mode='incremental') - env = {"LOGNAME": "shared", "NIX_REMOTE": "daemon"} + env = { + "LOGNAME": "shared", + "NIX_REMOTE": "daemon", + "dummy_secrets": "true", + } # prepare nix-shell # the dependencies which are used by the test script -- cgit v1.2.3 From 0c391c4d615ede78622809fc4b08211b1e2ea0af Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 5 Aug 2016 14:37:51 +0200 Subject: s 2 buildbot: fix missing , --- shared/2configs/shared-buildbot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shared/2configs/shared-buildbot.nix') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index 85e3cdf1..688be2e4 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -98,7 +98,7 @@ f = util.BuildFactory() f.addStep(grab_repo) - for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" "test-failing" ]: + for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7", "test-failing" ]: addShell(f,name="build-{}".format(i),env=env, command=nixshell + \ ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ -- cgit v1.2.3 From 7b1110defbc1971dd60e1bb5100dc484cb204bc5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 5 Aug 2016 16:52:28 +0200 Subject: s 2 shared-buildbot: disable test-failing --- shared/2configs/shared-buildbot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shared/2configs/shared-buildbot.nix') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index 688be2e4..58db4c94 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -98,7 +98,7 @@ f = util.BuildFactory() f.addStep(grab_repo) - for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7", "test-failing" ]: + for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" ]: addShell(f,name="build-{}".format(i),env=env, command=nixshell + \ ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ -- cgit v1.2.3