summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/chromium.nix30
-rw-r--r--nixos/tests/nginx-variants.nix2
2 files changed, 20 insertions, 12 deletions
diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix
index 60ecf986d6e..c17d1953894 100644
--- a/nixos/tests/chromium.nix
+++ b/nixos/tests/chromium.nix
@@ -63,17 +63,25 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
         return "su - ${user} -c " + shlex.quote(cmd)
 
 
-    def get_browser_binary():
-        """Returns the name of the browser binary."""
+    def get_browser_call():
+        """Returns the name of the browser binary as well as CLI options."""
+        # Determine the name of the binary:
         pname = "${getName chromiumPkg.name}"
         if pname.find("chromium") != -1:
-            return "chromium"  # Same name for all channels and ungoogled-chromium
-        if pname == "google-chrome":
-            return "google-chrome-stable"
-        if pname == "google-chrome-dev":
-            return "google-chrome-unstable"
-        # For google-chrome-beta and as fallback:
-        return pname
+            binary = "chromium"  # Same name for all channels and ungoogled-chromium
+        elif pname == "google-chrome":
+            binary = "google-chrome-stable"
+        elif pname == "google-chrome-dev":
+            binary = "google-chrome-unstable"
+        else:  # For google-chrome-beta and as fallback:
+            binary = pname
+        # Add optional CLI options:
+        options = ""
+        major_version = "${versions.major (getVersion chromiumPkg.name)}"
+        if major_version > "91":
+            # To avoid a GPU crash:
+            options += "--use-gl=angle --use-angle=swiftshader"
+        return f"{binary} {options}"
 
 
     def create_new_win():
@@ -135,9 +143,9 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
     machine.wait_for_x()
 
     url = "file://${startupHTML}"
-    machine.succeed(ru(f'ulimit -c unlimited; "{get_browser_binary()}" "{url}" & disown'))
+    machine.succeed(ru(f'ulimit -c unlimited; {get_browser_call()} "{url}" & disown'))
 
-    if get_browser_binary().startswith("google-chrome"):
+    if get_browser_call().startswith("google-chrome"):
         # Need to click away the first window:
         machine.wait_for_text("Make Google Chrome the default browser")
         machine.screenshot("google_chrome_default_browser_prompt")
diff --git a/nixos/tests/nginx-variants.nix b/nixos/tests/nginx-variants.nix
index a535030663b..96a9a2c3b8c 100644
--- a/nixos/tests/nginx-variants.nix
+++ b/nixos/tests/nginx-variants.nix
@@ -29,5 +29,5 @@ builtins.listToAttrs (
         };
       }
     )
-    [ "nginxStable" "nginxMainline" "nginxShibboleth" "openresty" "tengine" ]
+    [ "nginxStable" "nginxMainline" "nginxQuic" "nginxShibboleth" "openresty" "tengine" ]
 )