From 4f78007f42d5a796c2f40c907cb02e4fa67649a0 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 6 Sep 2024 12:12:22 +0900 Subject: [PATCH 1/2] Impelemt CI --- .fmf/version | 1 + plans/test.fmf | 5 +++++ tests/validation/main.fmf | 8 ++++++++ tests/validation/main.js | 17 +++++++++++++++++ tests/validation/test.js | 7 +++++++ tests/validation/test.sh | 17 +++++++++++++++++ 6 files changed, 55 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/test.fmf create mode 100644 tests/validation/main.fmf create mode 100644 tests/validation/main.js create mode 100644 tests/validation/test.js create mode 100755 tests/validation/test.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/test.fmf b/plans/test.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/test.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/validation/main.fmf b/tests/validation/main.fmf new file mode 100644 index 0000000..d396a72 --- /dev/null +++ b/tests/validation/main.fmf @@ -0,0 +1,8 @@ +summary: Lint check for GNOME-Shell extension files +test: ./test.sh +framework: beakerlib +require: + - gjs + - glib2 + - gnome-shell-extension-no-overview + - json-glib-devel diff --git a/tests/validation/main.js b/tests/validation/main.js new file mode 100644 index 0000000..c5163d9 --- /dev/null +++ b/tests/validation/main.js @@ -0,0 +1,17 @@ +import GObject from 'gi://GObject'; + +export const LayoutManager = GObject.registerClass( +class LayoutManager extends GObject.Object { + constructor() { + super(); + this._startingUp = 1; + } + + connectObject(object) { + } + + disconnectObject(object) { + } +}); + +export let layoutManager = new LayoutManager(); diff --git a/tests/validation/test.js b/tests/validation/test.js new file mode 100644 index 0000000..ae1b278 --- /dev/null +++ b/tests/validation/test.js @@ -0,0 +1,7 @@ +import GObject from 'gi://GObject'; + +import NoOverviewExtension from './extension.js'; + +let extension = new NoOverviewExtension(); +extension.enable(); +extension.disable(); diff --git a/tests/validation/test.sh b/tests/validation/test.sh new file mode 100755 index 0000000..b7e5709 --- /dev/null +++ b/tests/validation/test.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k + +# gjs or js115 in mozjs115-devel provides very simple validations. + +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun -t "sed -e 's|resource:.*/main.js|./main.js|' /usr/share/gnome-shell/extensions/no-overview@fthx/extension.js > extension.js" + rlPhaseEnd + + rlPhaseStartTest + rlRun -t "json-glib-validate /usr/share/gnome-shell/extensions/no-overview@fthx/metadata.json" + rlRun -t "gjs -m test.js" + rlPhaseEnd +rlJournalEnd From d2030d2eea111ab7b06af55a5de9926dbf282851 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 6 Sep 2024 13:55:03 +0900 Subject: [PATCH 2/2] Add gnome-shell-47 Resolves: RHEL-54599 Add gnome-shell-extension-no-overview to RHEL 10 --- gnome-shell-extension-no-overview-HEAD.patch | 27 ++++++++++++++++++++ gnome-shell-extension-no-overview.spec | 1 + 2 files changed, 28 insertions(+) create mode 100644 gnome-shell-extension-no-overview-HEAD.patch diff --git a/gnome-shell-extension-no-overview-HEAD.patch b/gnome-shell-extension-no-overview-HEAD.patch new file mode 100644 index 0000000..bef7bbc --- /dev/null +++ b/gnome-shell-extension-no-overview-HEAD.patch @@ -0,0 +1,27 @@ +From b0d987702a63f27a062fd2e2da5d99cc0799972e Mon Sep 17 00:00:00 2001 +From: Takao Fujiwara +Date: Fri, 6 Sep 2024 13:50:52 +0900 +Subject: [PATCH] Add gnome-shell-47 + +--- + metadata.json | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/metadata.json b/metadata.json +index 695d317..57cfc5d 100644 +--- a/metadata.json ++++ b/metadata.json +@@ -3,8 +3,8 @@ + "description": "No overview at start-up. Nothing more.", + "name": "No overview at start-up", + "original-authors": ["fthx"], +- "shell-version": ["46"], ++ "shell-version": ["46", "47"], + "url": "https://github.com/fthx/no-overview", + "uuid": "no-overview@fthx", + "version": 999 + } +\ No newline at end of file +-- +2.45.2 + diff --git a/gnome-shell-extension-no-overview.spec b/gnome-shell-extension-no-overview.spec index 56fbb78..d0a4214 100644 --- a/gnome-shell-extension-no-overview.spec +++ b/gnome-shell-extension-no-overview.spec @@ -12,6 +12,7 @@ Source0: https://github.com/fthx/no-overview/archive/refs/tags/v%{version Source1: https://raw.githubusercontent.com/fthx/no-overview/main/LICENSE#/%{extension}-LICENSE Source2: https://raw.githubusercontent.com/fthx/no-overview/main/README.md#/%{extension}-README.md #Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch BuildArch: noarch # rhbz#2001561 Delete to require gnome-shell-extension-common #Requires: gnome-shell-extension-common