Skip to content

Commit

Permalink
clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Jul 30, 2023
1 parent 6b401ad commit 2ad1508
Show file tree
Hide file tree
Showing 30 changed files with 9 additions and 229 deletions.
8 changes: 0 additions & 8 deletions test/auto-1/root/app/Main.hs

This file was deleted.

37 changes: 0 additions & 37 deletions test/auto-1/root/flake.nix

This file was deleted.

5 changes: 0 additions & 5 deletions test/auto-1/root/src/Root/Lib.hs

This file was deleted.

15 changes: 0 additions & 15 deletions test/auto-1/test.nix

This file was deleted.

1 change: 0 additions & 1 deletion test/auto-2/root/cabal.project

This file was deleted.

16 changes: 0 additions & 16 deletions test/auto-2/root/flake.nix

This file was deleted.

5 changes: 0 additions & 5 deletions test/auto-2/root/src/Root/Lib.hs

This file was deleted.

13 changes: 0 additions & 13 deletions test/auto-2/test.nix

This file was deleted.

7 changes: 0 additions & 7 deletions test/auto-3/root/Main.hs

This file was deleted.

5 changes: 0 additions & 5 deletions test/auto-3/root/Root/Lib.hs

This file was deleted.

1 change: 0 additions & 1 deletion test/auto-3/root/cabal.project

This file was deleted.

18 changes: 0 additions & 18 deletions test/auto-3/root/flake.nix

This file was deleted.

25 changes: 0 additions & 25 deletions test/auto-3/test.nix

This file was deleted.

8 changes: 0 additions & 8 deletions test/auto-4/root/Main.hs

This file was deleted.

8 changes: 0 additions & 8 deletions test/auto-4/root/Root/Lib.hs

This file was deleted.

20 changes: 0 additions & 20 deletions test/auto-4/root/flake.nix

This file was deleted.

13 changes: 0 additions & 13 deletions test/auto-4/test.nix

This file was deleted.

7 changes: 0 additions & 7 deletions test/auto-5/root/app/Main.hs

This file was deleted.

1 change: 0 additions & 1 deletion test/auto-5/root/cabal.project

This file was deleted.

File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions test/auto-5/root/flake.nix → test/basic/root/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
cabal.dependencies = ["aeson"];
library.enable = true;
library.dependencies = ["messagepack"];
executables.root = { enable = true; source-dirs = "app"; };
executables.root = { enable = true; source-dirs = "."; };
test.enable = true;
};
cabal.dependencies = ["base" "polysemy"];
envs.dev.ghc.compiler = "ghc90";
cabal.dependencies = ["base" "some"];
};
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Root.Lib where

import Polysemy
import Data.Some
import Data.Aeson
import Data.MessagePack

Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions test/auto-5/test.nix → test/basic/test.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs }:
{
test = builtins.toFile "auto-5-test" ''
test = builtins.toFile "basic-test" ''
cd ./root
nix flake update
Expand All @@ -12,8 +12,7 @@
check 'nix develop .#ghc94 -c ghc --version' 'The Glorious Glasgow Haskell Compilation System, version 9.4.5'
nix build .#ghc90-root
nix build .#ghc92-root
check 'result/bin/root' 'string' 'Running the main package produced the wrong output'
'';
}
6 changes: 1 addition & 5 deletions test/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ let
test = name: (import (./. + "/${name}/test.nix") { inherit pkgs; }).test;

tests = {
basic = test "basic";
deps = test "deps";
ghci = test "ghci";
packages = test "packages";
hackage = test "hackage";
auto-1 = test "auto-1";
auto-2 = test "auto-2";
auto-3 = test "auto-3";
auto-4 = test "auto-4";
auto-5 = test "auto-5";
cross = test "cross";
service = test "service";
postgres = test "postgres";
Expand Down
2 changes: 0 additions & 2 deletions test/deps/test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
fail "Running the main package produced the wrong output:\n$output"
fi
nix build .#ghc90-root
nix run .#hls 2>/dev/null
'';
}
1 change: 0 additions & 1 deletion test/ghci/root/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
test.enable = true;
test.env = "hix-ghci-test";
};
compiler = "ghc90";
envs.hix-ghci-test.services.test.enable = true;
services.test = {
nixos.services.nginx = {
Expand Down
3 changes: 2 additions & 1 deletion test/overrides/root/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
};
};
compat.enable = false;
gen-overrides.enable = true;
overrides = {self, pkgs, hackage, jailbreak, buildInputs, ...}: {
aeson = hackage "2.1.2.1" "1f1f6h2r60ghz4p1ddi6wnq6z3i07j60sgm77hx2rvmncz4vizp0";
extra = jailbreak;
root1 = jailbreak self.root;
root = buildInputs [pkgs.git];
};
gen-overrides.enable = true;
output.extraPackages = ["root1"];
});
}
1 change: 1 addition & 0 deletions test/overrides/test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ in {
check 'nix eval .#legacyPackages.${pkgs.system}.ghc.aeson.version' '"2.1.2.1"' 'aeson version wrong after gen-overrides'
nix build .#root1
nix flake check
sed -i 's/2\.1/5.8/' flake.nix
Expand Down

0 comments on commit 2ad1508

Please sign in to comment.