Skip to content

Commit

Permalink
Extend snapshot test suite to also work with the run-activity tool
Browse files Browse the repository at this point in the history
  • Loading branch information
svanderburg committed Feb 12, 2018
1 parent 502e538 commit a0342ed
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
35 changes: 21 additions & 14 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

let
pkgs = import nixpkgs {};

# Refer either to dysnomia in the parent folder, or to the one in Nixpkgs
dysnomiaJobset = if fetchDependenciesFromNixpkgs then {
build = pkgs.lib.genAttrs systems (system:
(import nixpkgs { inherit system; }).dysnomia
);
} else import ../dysnomia/release.nix { inherit nixpkgs systems officialRelease; };

jobs = rec {
tarball =
with pkgs;
Expand All @@ -30,26 +30,26 @@ let
dontBuild = false;

buildInputs = [ pkgconfig glib libxml2 libxslt getopt nixUnstable dblatex (dblatex.tex or tetex) doxygen nukeReferences help2man doclifter dysnomia ];

CFLAGS = "-Wall";

# Add documentation in the tarball
configureFlags = ''
--with-docbook-rng=${docbook5}/xml/rng/docbook
--with-docbook-xsl=${docbook5_xsl}/xml/xsl/docbook
'';

preConfigure = ''
# TeX needs a writable font cache.
export VARTEXFONTS=$TMPDIR/texfonts
'';

preDist = ''
make -C doc/manual install prefix=$out
make -C doc/manual index.pdf prefix=$out
cp doc/manual/index.pdf $out/index.pdf
make -C src apidox
cp -av doc/apidox $out/share/doc/disnix
Expand All @@ -60,7 +60,7 @@ let
# to Windows and Macs, so there should be no Linux binaries
# in the closure).
nuke-refs $out/index.pdf
echo "doc-pdf manual $out/index.pdf" >> $out/nix-support/hydra-build-products
echo "doc manual $out/share/doc/disnix/manual" >> $out/nix-support/hydra-build-products
echo "doc api $out/share/doc/disnix/apidox/html" >> $out/nix-support/hydra-build-products
Expand All @@ -80,10 +80,10 @@ let

buildInputs = [ pkgconfig glib libxml2 libxslt getopt nixUnstable dysnomia ]
++ lib.optionals (!stdenv.isLinux) [ libiconv gettext ];

CFLAGS = "-Wall";
});

tests =
let
dysnomia = builtins.getAttr (builtins.currentSystem) (dysnomiaJobset.build);
Expand Down Expand Up @@ -113,9 +113,15 @@ let
distbuild = import ./tests/distbuild.nix {
inherit nixpkgs dysnomia disnix;
};
snapshots = import ./tests/snapshots.nix {
snapshots-via-runactivity = import ./tests/snapshots.nix {
inherit nixpkgs dysnomia disnix;
inherit (pkgs) stdenv;
disnixRemoteClient = "disnix-run-activity";
};
snapshots-via-dbus = import ./tests/snapshots.nix {
inherit nixpkgs dysnomia disnix;
inherit (pkgs) stdenv;
disnixRemoteClient = "disnix-client";
};
datamigration = import ./tests/datamigration.nix {
inherit nixpkgs dysnomia disnix;
Expand All @@ -127,7 +133,7 @@ let
inherit nixpkgs dysnomia disnix;
};
};

release = pkgs.releaseTools.aggregate {
name = "disnix-${tarball.version}";
constituents = [
Expand All @@ -142,7 +148,8 @@ let
tests.install
tests.deployment
tests.distbuild
tests.snapshots
tests.snapshots-via-runactivity
tests.snapshots-via-dbus
tests.datamigration
tests.locking
tests.pkgs
Expand Down
4 changes: 2 additions & 2 deletions tests/snapshots.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{nixpkgs, stdenv, dysnomia, disnix}:
{nixpkgs, stdenv, dysnomia, disnix, disnixRemoteClient}:

let
manifestTests = ./manifest;
Expand All @@ -14,7 +14,7 @@ with import "${nixpkgs}/nixos/lib/testing.nix" { system = builtins.currentSystem
};
testScript =
let
env = "SSH_OPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'";
env = "SSH_OPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' DISNIX_REMOTE_CLIENT=${disnixRemoteClient}";
in
''
startAll;
Expand Down

0 comments on commit a0342ed

Please sign in to comment.