From e4407f8c9324d459e0cf676a5a3b29d807a738ee Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 21 Jan 2022 15:12:10 -0500 Subject: [PATCH] HydraTestContext: expose the nix state dir --- t/lib/HydraTestContext.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/lib/HydraTestContext.pm b/t/lib/HydraTestContext.pm index 9f9db4f2..b8c254d0 100644 --- a/t/lib/HydraTestContext.pm +++ b/t/lib/HydraTestContext.pm @@ -69,6 +69,7 @@ sub new { _db => undef, db_handle => $pgsql, tmpdir => $dir, + nix_state_dir => "$dir/nix/var/nix", testdir => abs_path(dirname(__FILE__) . "/.."), jobsdir => abs_path(dirname(__FILE__) . "/../jobs") }; @@ -115,6 +116,12 @@ sub jobsdir { return $self->{jobsdir}; } +sub nix_state_dir { + my ($self) = @_; + + return $self->{nix_state_dir}; +} + # Create a jobset, evaluate it, and optionally build the jobs. # # In return, you get a hash of all the Builds records, keyed