Impelemt CI
This commit is contained in:
parent
73fb42d5cd
commit
4f78007f42
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
5
plans/test.fmf
Normal file
5
plans/test.fmf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
summary: Basic smoke test
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
8
tests/validation/main.fmf
Normal file
8
tests/validation/main.fmf
Normal file
@ -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
|
17
tests/validation/main.js
Normal file
17
tests/validation/main.js
Normal file
@ -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();
|
7
tests/validation/test.js
Normal file
7
tests/validation/test.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import GObject from 'gi://GObject';
|
||||||
|
|
||||||
|
import NoOverviewExtension from './extension.js';
|
||||||
|
|
||||||
|
let extension = new NoOverviewExtension();
|
||||||
|
extension.enable();
|
||||||
|
extension.disable();
|
17
tests/validation/test.sh
Executable file
17
tests/validation/test.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user