about summary refs log tree commit diff
path: root/nixos/tests/chromium.nix
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2022-10-24 21:08:43 +0200
committerMichael Weiss <dev.primeos@gmail.com>2022-10-24 21:33:11 +0200
commit0fa4d17725f846951f2b80502a5f6c3695a31f99 (patch)
treefb85deffeb84a8b93eeb3b97a00133ff18d7f400 /nixos/tests/chromium.nix
parent7b0122aede0382ec215b8d455d821d7134515979 (diff)
nixos/tests/chromium: Fix the tests for Google Chrome
The meta attribute "timeout" is only set for Chromium (might still be required
due to the long build duration). The Google Chrome tests were failing with:

    error: attribute 'timeout' missing

According to nixos/lib/testing/meta.nix "null values are filtered out by
`meta`" so `timeout = chromiumPkg.meta.timeout or null` might be fine as
well.
Diffstat (limited to 'nixos/tests/chromium.nix')
-rw-r--r--nixos/tests/chromium.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix
index 6b296fe8a61ae..c6b04e6189746 100644
--- a/nixos/tests/chromium.nix
+++ b/nixos/tests/chromium.nix
@@ -39,7 +39,9 @@ mapAttrs (channel: chromiumPkg: makeTest {
   name = "chromium-${channel}";
   meta = {
     maintainers = with maintainers; [ aszlig primeos ];
+  } // optionalAttrs (chromiumPkg.meta ? timeout) {
     # https://github.com/NixOS/hydra/issues/591#issuecomment-435125621
+    # Note: optionalAttrs is used since meta.timeout is not set for Google Chrome
     inherit (chromiumPkg.meta) timeout;
   };