Refactoring repository...
Some checks are pending
Check Conventional Commit / check-commit-message (push) Waiting to run

This commit is contained in:
CELESTIFYX
2025-01-14 19:02:06 +02:00
parent 876fa0988e
commit 08abac9e7d
33171 changed files with 4677 additions and 761 deletions

View File

@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: GPL-3.0-or-later
---
$schema: https://json-schema.org/schema#
$id: https://calamares.io/schemas/displaymanager
additionalProperties: false
type: object
properties:
displaymanagers:
type: array
items:
type: string
enum: [slim, sddm, lightdm, gdm, mdm, lxdm, greetd]
minItems: 1 # Must be non-empty, if present at all
defaultDesktopEnvironment:
type: object
properties:
executable: { type: string }
desktopFile: { type: string }
required: [ executable, desktopFile ]
basicSetup: { type: boolean, default: false }
sysconfigSetup: { type: boolean, default: false }
greetd:
type: object
properties:
greeter_user: { type: string }
greeter_group: { type: string }
greeter_css_location: { type: string }
additionalProperties: false
lightdm:
type: object
properties:
preferred_greeters: { type: array, items: { type: string } }
additionalProperties: false
sddm:
type: object
properties:
configuration_file: { type: string }
additionalProperties: false

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
---
type: "job"
name: "displaymanager"
interface: "python"
script: "main.py"

View File

@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
rootMountPoint: /tmp

View File

@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# We have tests to load (some) of the DMs specifically, to test their
# configuration code. Those tests conventionally live in Python
# files here in the tests/ directory. Add them.
foreach(_dmname greetd sddm)
add_test(
NAME configure-displaymanager-${_dmname}
COMMAND env PYTHONPATH=.: python3 ${CMAKE_CURRENT_LIST_DIR}/test-dm-${_dmname}.py
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endforeach()

View File

@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Calamares Boilerplate
import libcalamares
libcalamares.globalstorage = libcalamares.GlobalStorage(None)
libcalamares.globalstorage.insert("testing", True)
# Module prep-work
from src.modules.displaymanager import main
default_desktop_environment = main.DesktopEnvironment("startplasma-x11", "kde-plasma.desktop")
import os
os.makedirs("/tmp/etc/greetd/", exist_ok=True)
try:
os.remove("/tmp/etc/greetd/config.toml")
except FileNotFoundError as e:
pass
try:
import toml
except ImportError:
# This is a failure of the test-environment.
import sys
print("Can't find module toml.", file=sys.stderr)
sys.exit(0)
# Specific DM test
d = main.DMgreetd("/tmp")
d.set_autologin("d", True, default_desktop_environment)
# .. and again (this time checks load/save)
d.set_autologin("d", True, default_desktop_environment)
d.set_autologin("d", True, default_desktop_environment)

View File

@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Calamares Boilerplate
import libcalamares
libcalamares.globalstorage = libcalamares.GlobalStorage(None)
libcalamares.globalstorage.insert("testing", True)
# Module prep-work
from src.modules.displaymanager import main
default_desktop_environment = main.DesktopEnvironment("startplasma-x11", "kde-plasma.desktop")
# Specific DM test
d = main.DMsddm("/tmp")
d.set_autologin("d", True, default_desktop_environment)
# .. and again (this time checks load/save)
d.set_autologin("d", True, default_desktop_environment)
d.set_autologin("d", True, default_desktop_environment)