Merge pull request #66236 from worldofpeace/test-reorganize
Reorganize GNOME tests, re-enable LightDM for release-combined
This commit is contained in:
commit
2eaef474f2
@ -68,8 +68,9 @@ in rec {
|
|||||||
nixos.tests.chromium.x86_64-linux or []
|
nixos.tests.chromium.x86_64-linux or []
|
||||||
(all nixos.tests.firefox)
|
(all nixos.tests.firefox)
|
||||||
(all nixos.tests.firewall)
|
(all nixos.tests.firewall)
|
||||||
(except ["aarch64-linux"] nixos.tests.gnome3)
|
(all nixos.tests.gnome3-xorg)
|
||||||
(except ["aarch64-linux"] nixos.tests.pantheon)
|
(all nixos.tests.gnome3)
|
||||||
|
(all nixos.tests.pantheon)
|
||||||
nixos.tests.installer.zfsroot.x86_64-linux or [] # ZFS is 64bit only
|
nixos.tests.installer.zfsroot.x86_64-linux or [] # ZFS is 64bit only
|
||||||
(except ["aarch64-linux"] nixos.tests.installer.lvm)
|
(except ["aarch64-linux"] nixos.tests.installer.lvm)
|
||||||
(except ["aarch64-linux"] nixos.tests.installer.luksroot)
|
(except ["aarch64-linux"] nixos.tests.installer.luksroot)
|
||||||
@ -103,7 +104,7 @@ in rec {
|
|||||||
#(all nixos.tests.keymap.neo)
|
#(all nixos.tests.keymap.neo)
|
||||||
#(all nixos.tests.keymap.qwertz)
|
#(all nixos.tests.keymap.qwertz)
|
||||||
(all nixos.tests.plasma5)
|
(all nixos.tests.plasma5)
|
||||||
#(all nixos.tests.lightdm)
|
(all nixos.tests.lightdm)
|
||||||
(all nixos.tests.login)
|
(all nixos.tests.login)
|
||||||
(all nixos.tests.misc)
|
(all nixos.tests.misc)
|
||||||
(all nixos.tests.mutableUsers)
|
(all nixos.tests.mutableUsers)
|
||||||
|
@ -93,8 +93,8 @@ in
|
|||||||
gitlab = handleTest ./gitlab.nix {};
|
gitlab = handleTest ./gitlab.nix {};
|
||||||
gitolite = handleTest ./gitolite.nix {};
|
gitolite = handleTest ./gitolite.nix {};
|
||||||
gjs = handleTest ./gjs.nix {};
|
gjs = handleTest ./gjs.nix {};
|
||||||
gnome3 = handleTestOn ["x86_64-linux"] ./gnome3.nix {}; # libsmbios is unsupported on aarch64
|
gnome3-xorg = handleTest ./gnome3-xorg.nix {};
|
||||||
gnome3-gdm = handleTestOn ["x86_64-linux"] ./gnome3-gdm.nix {}; # libsmbios is unsupported on aarch64
|
gnome3 = handleTest ./gnome3.nix {};
|
||||||
gocd-agent = handleTest ./gocd-agent.nix {};
|
gocd-agent = handleTest ./gocd-agent.nix {};
|
||||||
gocd-server = handleTest ./gocd-server.nix {};
|
gocd-server = handleTest ./gocd-server.nix {};
|
||||||
google-oslogin = handleTest ./google-oslogin {};
|
google-oslogin = handleTest ./google-oslogin {};
|
||||||
@ -139,7 +139,7 @@ in
|
|||||||
ldap = handleTest ./ldap.nix {};
|
ldap = handleTest ./ldap.nix {};
|
||||||
leaps = handleTest ./leaps.nix {};
|
leaps = handleTest ./leaps.nix {};
|
||||||
lidarr = handleTest ./lidarr.nix {};
|
lidarr = handleTest ./lidarr.nix {};
|
||||||
#lightdm = handleTest ./lightdm.nix {};
|
lightdm = handleTest ./lightdm.nix {};
|
||||||
limesurvey = handleTest ./limesurvey.nix {};
|
limesurvey = handleTest ./limesurvey.nix {};
|
||||||
login = handleTest ./login.nix {};
|
login = handleTest ./login.nix {};
|
||||||
loki = handleTest ./loki.nix {};
|
loki = handleTest ./loki.nix {};
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
|
||||||
name = "gnome3-gdm";
|
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
|
||||||
maintainers = [ lethalman ];
|
|
||||||
};
|
|
||||||
|
|
||||||
machine =
|
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{ imports = [ ./common/user-account.nix ];
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
|
||||||
|
|
||||||
services.xserver.displayManager.gdm = {
|
|
||||||
enable = true;
|
|
||||||
autoLogin = {
|
|
||||||
enable = true;
|
|
||||||
user = "alice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.xserver.desktopManager.gnome3.enable = true;
|
|
||||||
|
|
||||||
virtualisation.memorySize = 1024;
|
|
||||||
};
|
|
||||||
|
|
||||||
testScript = let
|
|
||||||
# Keep line widths somewhat managable
|
|
||||||
bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus";
|
|
||||||
gdbus = "${bus} gdbus";
|
|
||||||
# Call javascript in gnome shell, returns a tuple (success, output), where
|
|
||||||
# `success` is true if the dbus call was successful and output is what the
|
|
||||||
# javascript evaluates to.
|
|
||||||
eval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval";
|
|
||||||
# False when startup is done
|
|
||||||
startingUp = "${gdbus} ${eval} Main.layoutManager._startingUp";
|
|
||||||
# Hopefully gnome-terminal's wm class
|
|
||||||
wmClass = "${gdbus} ${eval} global.display.focus_window.wm_class";
|
|
||||||
in ''
|
|
||||||
# wait for gdm to start
|
|
||||||
$machine->waitForUnit("display-manager.service");
|
|
||||||
|
|
||||||
# wait for alice to be logged in
|
|
||||||
$machine->waitForUnit("default.target","alice");
|
|
||||||
|
|
||||||
# Check that logging in has given the user ownership of devices.
|
|
||||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
|
||||||
|
|
||||||
# Wait for the wayland server
|
|
||||||
$machine->waitForFile("/run/user/1000/wayland-0");
|
|
||||||
|
|
||||||
# Wait for gnome shell, correct output should be "(true, 'false')"
|
|
||||||
$machine->waitUntilSucceeds("su - alice -c '${startingUp} | grep -q true,..false'");
|
|
||||||
|
|
||||||
# open a terminal
|
|
||||||
$machine->succeed("su - alice -c '${bus} gnome-terminal'");
|
|
||||||
# and check it's there
|
|
||||||
$machine->waitUntilSucceeds("su - alice -c '${wmClass} | grep -q gnome-terminal-server'");
|
|
||||||
|
|
||||||
# wait to get a nice screenshot
|
|
||||||
$machine->sleep(20);
|
|
||||||
$machine->screenshot("screen");
|
|
||||||
'';
|
|
||||||
})
|
|
41
nixos/tests/gnome3-xorg.nix
Normal file
41
nixos/tests/gnome3-xorg.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
name = "gnome3-xorg";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = pkgs.gnome3.maintainers;
|
||||||
|
};
|
||||||
|
|
||||||
|
machine =
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{ imports = [ ./common/user-account.nix ];
|
||||||
|
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
services.xserver.displayManager.gdm.enable = false;
|
||||||
|
services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
||||||
|
services.xserver.displayManager.lightdm.autoLogin.user = "alice";
|
||||||
|
services.xserver.desktopManager.gnome3.enable = true;
|
||||||
|
services.xserver.desktopManager.default = "gnome-xorg";
|
||||||
|
|
||||||
|
virtualisation.memorySize = 1024;
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript =
|
||||||
|
''
|
||||||
|
$machine->waitForX;
|
||||||
|
|
||||||
|
# wait for alice to be logged in
|
||||||
|
$machine->waitForUnit("default.target","alice");
|
||||||
|
|
||||||
|
# Check that logging in has given the user ownership of devices.
|
||||||
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||||
|
|
||||||
|
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
|
$machine->waitForWindow(qr/alice.*machine/);
|
||||||
|
$machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'");
|
||||||
|
$machine->sleep(10);
|
||||||
|
$machine->screenshot("screen");
|
||||||
|
'';
|
||||||
|
})
|
@ -1,7 +1,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "gnome3";
|
name = "gnome3";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ domenkozar eelco lethalman ];
|
maintainers = pkgs.gnome3.maintainers;
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
@ -11,19 +11,34 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
|
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
services.xserver.displayManager.gdm.enable = false;
|
services.xserver.displayManager.gdm = {
|
||||||
services.xserver.displayManager.lightdm.enable = true;
|
enable = true;
|
||||||
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
autoLogin = {
|
||||||
services.xserver.displayManager.lightdm.autoLogin.user = "alice";
|
enable = true;
|
||||||
|
user = "alice";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.xserver.desktopManager.gnome3.enable = true;
|
services.xserver.desktopManager.gnome3.enable = true;
|
||||||
services.xserver.desktopManager.default = "gnome-xorg";
|
|
||||||
|
|
||||||
virtualisation.memorySize = 1024;
|
virtualisation.memorySize = 1024;
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript = let
|
||||||
''
|
# Keep line widths somewhat managable
|
||||||
$machine->waitForX;
|
bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus";
|
||||||
|
gdbus = "${bus} gdbus";
|
||||||
|
# Call javascript in gnome shell, returns a tuple (success, output), where
|
||||||
|
# `success` is true if the dbus call was successful and output is what the
|
||||||
|
# javascript evaluates to.
|
||||||
|
eval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval";
|
||||||
|
# False when startup is done
|
||||||
|
startingUp = "${gdbus} ${eval} Main.layoutManager._startingUp";
|
||||||
|
# Hopefully gnome-terminal's wm class
|
||||||
|
wmClass = "${gdbus} ${eval} global.display.focus_window.wm_class";
|
||||||
|
in ''
|
||||||
|
# wait for gdm to start
|
||||||
|
$machine->waitForUnit("display-manager.service");
|
||||||
|
|
||||||
# wait for alice to be logged in
|
# wait for alice to be logged in
|
||||||
$machine->waitForUnit("default.target","alice");
|
$machine->waitForUnit("default.target","alice");
|
||||||
@ -31,11 +46,19 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
# Check that logging in has given the user ownership of devices.
|
# Check that logging in has given the user ownership of devices.
|
||||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||||
|
|
||||||
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
# Wait for the wayland server
|
||||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
$machine->waitForFile("/run/user/1000/wayland-0");
|
||||||
$machine->waitForWindow(qr/alice.*machine/);
|
|
||||||
$machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'");
|
# Wait for gnome shell, correct output should be "(true, 'false')"
|
||||||
$machine->sleep(10);
|
$machine->waitUntilSucceeds("su - alice -c '${startingUp} | grep -q true,..false'");
|
||||||
|
|
||||||
|
# open a terminal
|
||||||
|
$machine->succeed("su - alice -c '${bus} gnome-terminal'");
|
||||||
|
# and check it's there
|
||||||
|
$machine->waitUntilSucceeds("su - alice -c '${wmClass} | grep -q gnome-terminal-server'");
|
||||||
|
|
||||||
|
# wait to get a nice screenshot
|
||||||
|
$machine->sleep(20);
|
||||||
$machine->screenshot("screen");
|
$machine->screenshot("screen");
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "lightdm";
|
name = "lightdm";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ aszlig ];
|
maintainers = [ aszlig worldofpeace ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine = { ... }: {
|
machine = { ... }: {
|
||||||
|
@ -3,6 +3,12 @@
|
|||||||
, gtk3, gsettings-desktop-schemas, gnome-desktop, libxmlb, gnome-online-accounts, hicolor-icon-theme
|
, gtk3, gsettings-desktop-schemas, gnome-desktop, libxmlb, gnome-online-accounts, hicolor-icon-theme
|
||||||
, json-glib, libsecret, valgrind-light, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_43, gtk-doc, desktop-file-utils }:
|
, json-glib, libsecret, valgrind-light, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_43, gtk-doc, desktop-file-utils }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
withFwupd = stdenv.isx86_64 || stdenv.isi686;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "gnome-software-${version}";
|
name = "gnome-software-${version}";
|
||||||
version = "3.32.4";
|
version = "3.32.4";
|
||||||
@ -29,13 +35,16 @@ stdenv.mkDerivation rec {
|
|||||||
gtk3 glib packagekit appstream-glib libsoup
|
gtk3 glib packagekit appstream-glib libsoup
|
||||||
gsettings-desktop-schemas gnome-desktop
|
gsettings-desktop-schemas gnome-desktop
|
||||||
gspell json-glib libsecret ostree
|
gspell json-glib libsecret ostree
|
||||||
polkit flatpak fwupd
|
polkit flatpak libxmlb gnome-online-accounts
|
||||||
libxmlb gnome-online-accounts
|
] ++ stdenv.lib.optionals withFwupd [
|
||||||
|
fwupd
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dubuntu_reviews=false"
|
"-Dubuntu_reviews=false"
|
||||||
"-Dgudev=false"
|
"-Dgudev=false"
|
||||||
|
] ++ stdenv.lib.optionals (!withFwupd) [
|
||||||
|
"-Dfwupd=false"
|
||||||
];
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
@ -17,6 +17,18 @@ let
|
|||||||
fontsConf = makeFontsConf {
|
fontsConf = makeFontsConf {
|
||||||
fontDirectories = [ freefont_ttf ];
|
fontDirectories = [ freefont_ttf ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
isx86 = stdenv.isx86_64 || stdenv.isi686;
|
||||||
|
|
||||||
|
# Dell isn't supported on Aarch64
|
||||||
|
haveDell = isx86;
|
||||||
|
|
||||||
|
# only redfish for x86_64
|
||||||
|
haveRedfish = stdenv.isx86_64;
|
||||||
|
|
||||||
|
# Currently broken on Aarch64
|
||||||
|
haveFlashrom = isx86;
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "fwupd";
|
pname = "fwupd";
|
||||||
version = "1.2.8";
|
version = "1.2.8";
|
||||||
@ -32,11 +44,12 @@ in stdenv.mkDerivation rec {
|
|||||||
meson ninja gtk-doc pkgconfig gobject-introspection intltool shared-mime-info
|
meson ninja gtk-doc pkgconfig gobject-introspection intltool shared-mime-info
|
||||||
valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook vala
|
valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook vala
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
polkit libxmlb gusb sqlite libarchive libsoup elfutils libsmbios gnu-efi libyaml
|
polkit libxmlb gusb sqlite libarchive libsoup elfutils gnu-efi libyaml
|
||||||
libgudev colord gpgme libuuid gnutls glib-networking efivar json-glib umockdev
|
libgudev colord gpgme libuuid gnutls glib-networking json-glib umockdev
|
||||||
bash-completion cairo freetype fontconfig pango
|
bash-completion cairo freetype fontconfig pango efivar
|
||||||
];
|
] ++ stdenv.lib.optionals haveDell [ libsmbios ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./fix-paths.patch
|
./fix-paths.patch
|
||||||
@ -71,11 +84,14 @@ in stdenv.mkDerivation rec {
|
|||||||
# /etc/os-release not available in sandbox
|
# /etc/os-release not available in sandbox
|
||||||
# doCheck = true;
|
# doCheck = true;
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = let
|
||||||
|
binPath = [ efibootmgr bubblewrap tpm2-tools ] ++ stdenv.lib.optional haveFlashrom flashrom;
|
||||||
|
in
|
||||||
|
''
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
||||||
# See programs reached with fu_common_find_program_in_path in source
|
# See programs reached with fu_common_find_program_in_path in source
|
||||||
--prefix PATH : "${stdenv.lib.makeBinPath [ flashrom efibootmgr bubblewrap tpm2-tools ]}"
|
--prefix PATH : "${stdenv.lib.makeBinPath binPath}"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -89,6 +105,13 @@ in stdenv.mkDerivation rec {
|
|||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
||||||
|
] ++ stdenv.lib.optionals (!haveDell) [
|
||||||
|
"-Dplugin_dell=false"
|
||||||
|
"-Dplugin_synaptics=false"
|
||||||
|
] ++ stdenv.lib.optionals (!haveRedfish) [
|
||||||
|
"-Dplugin_redfish=false"
|
||||||
|
] ++ stdenv.lib.optionals (!haveFlashrom) [
|
||||||
|
"-Dplugin_flashrom=false"
|
||||||
];
|
];
|
||||||
|
|
||||||
# TODO: We need to be able to override the directory flags from meson setup hook
|
# TODO: We need to be able to override the directory flags from meson setup hook
|
||||||
|
Loading…
x
Reference in New Issue
Block a user