add first evaluations tests
[?]
Mar 16, 2011, 1:18 PM
HX4QYOYAKKFKK4KF6SZ6FQCM5ZF7ZFDTQUR4GS5WPPTYZASYZZUACDependencies
- [2]
2KJFOYGShydra: Actually check for Nix in `configure'. - [3]
HHPQFVQMadd local srcdir to perl5lib env var - [4]
EFPZWV5S - [5]
7RO7CINMsetup environment variables for tests - [6]
WHS5RMPO - [7]
G2ZB6464first test, not yet in buildprocess - [8]
FV2M6MOThydra: use autoconf/-make - [9]
M3A5PZIHhydra: Clarify the dependency on BDW-GC.
Change contents
- replacement in configure.ac at line 39
AC_CHECK_LIB([expr], [_ZN3nix17parseExprFromFileERNS_9EvalStateESs], [:],[AC_MSG_ERROR([Nix library not found; please install Nix or check the `--with-nix' option.])])#AC_CHECK_LIB([expr], [_ZN3nix17parseExprFromFileERNS_9EvalStateESs], [:],# [AC_MSG_ERROR([Nix library not found; please install Nix or check the `--with-nix' option.])]) - edit in configure.ac at line 70
tests/evaluation-tests.pl - replacement in tests/Makefile.am at line 1
TESTDIR=`pwd` - replacement in tests/Makefile.am at line 4
HYDRA_DATA="$(top_srcdir)/tests/data" \HYDRA_DATA="$(TESTDIR)/data" \ - replacement in tests/Makefile.am at line 7
NIX_STATE_DIR=$(top_srcdir)/tests/nix/var \NIX_DATA_DIR=$(top_srcdir)/tests/nix/var \NIX_STORE_DIR=$(top_srcdir)/tests/nix/store \NIX_STATE_DIR="$(TESTDIR)/nix/var/nix" \NIX_STORE_DIR="$(TESTDIR)/nix/store" \NIX_LOG_DIR="$(TESTDIR)/nix/var/log/nix" \ - replacement in tests/Makefile.am at line 14
query-all-tables.plquery-all-tables.pl \evaluation-tests.plclean :chmod -R a+w nixrm -rf db.sqlite data nix - replacement in tests/Makefile.am at line 21
$(TESTS) : db.sqlite dirs$(TESTS) : clean db.sqlite dirs - file addition: Setup.pm[5.73]
package Setup;use strict;use Exporter;our @ISA = qw(Exporter);our @EXPORT = qw(hydra_setup);sub hydra_setup {my ($db) = @_;$db->resultset('Users')->create({ username => "root", emailaddress => 'root@email.com', password => '' });}1; - file addition: evaluation-tests.pl.in[5.73]
#! @perl@ -w -I@nix@/libexec/nixuse strict;use Hydra::Schema;use Hydra::Helper::Nix;use Hydra::Helper::AddBuilds;use Cwd;use Setup;my $db = openHydraDB;use Test::Simple tests => 1;hydra_setup($db);my $res;my $stdout;my $stderr;my $project = $db->resultset('Projects')->create({name => "tests", displayname => "", owner => "root"});my $jobset = $project->jobsets->create({name => "basic", nixexprinput => "input", nixexprpath => "basic.nix", emailoverride => ""});my $jobsetinput = $jobset->jobsetinputs->create({name => "input", type => "path"});my $jobsetinputals = $jobsetinput->jobsetinputalts->create({altnr => 0, value => getcwd."/jobs"});($res, $stdout, $stderr) = captureStdoutStderr(60, ("../src/script/hydra_evaluator.pl", "tests", "basic"));ok($res, "Evaluating jobs/basic.nix should exit with return code 0");print STDERR "\n$res\n"; - file addition: jobs[5.73]
- file addition: basic.nix[0.1729]
{ input }:{empty_dir =derivation {name = "empty-dir";system = builtins.currentSystem;builder = ./empty-dir-builder.sh;};fails =derivation {name = "fails";system = builtins.currentSystem;builder = ./fail.sh;};succeed_with_failed =derivation {name = "succeed-with-failed";system = builtins.currentSystem;builder = ./succeed-with-failed.sh;};} - file addition: empty-dir-builder.sh[0.1729]
mkdir $out - file addition: fail.sh[0.1729]
exit 1 - file addition: succeed-with-failed.sh[0.1729]
mkdir -p $out/nix-support/failed