HX4QYOYAKKFKK4KF6SZ6FQCM5ZF7ZFDTQUR4GS5WPPTYZASYZZUAC
2KJFOYGSVN3TYHG7YCXJLNYMHCVY7E6LYV4QPRTUSJLJCRGKF7HAC
HHPQFVQMVW7BKYHUH4SCXA7UFQLZUZTMVIZW4D7AMRGALXKCODAQC
EFPZWV5SI6QISZYAN5II4XAVTUMCP63UC3YC4LR67HNAGLDGSRPAC
FV2M6MOTAP4BJMEKU5XUDVEACWEJGEIRCCE2MRY3F6SF2SFOE3MQC
G2ZB6464XGPBIMSZIPSB24EIXSCCGV4XWC3IWPS2CXYPDSUZSU5QC
WHS5RMPOJIHWRANRNCI2PQQQ5FXF3OOYN7BC23EBPY5QIU74KK6AC
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.])])
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;
#! @perl@ -w -I@nix@/libexec/nix
use 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";
{ 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;
};
}
mkdir $out
exit 1
mkdir -p $out/nix-support/failed