Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
3995fd413a
!26 enable make check
From: @zppzhangpan 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2023-12-11 07:36:13 +00:00
zppzhangpan
f4c0927ed6 enable make check 2023-12-11 15:19:06 +08:00
openeuler-ci-bot
b77cf01ca1
!21 [sync] PR-16: fix taiwan to China Taiwan
From: @openeuler-sync-bot 
Reviewed-by: @leeffo 
Signed-off-by: @leeffo
2023-06-15 02:20:11 +00:00
liweiganga
6d7e3ae64b fix taiwan to China Taiwan
(cherry picked from commit 3d9a5ab34975c46eda649c1007b77ff880d557f1)
2023-06-15 09:52:32 +08:00
openeuler-ci-bot
32907def49
!17 [sync] PR-15: update to 2.38
From: @openeuler-sync-bot 
Reviewed-by: @weidongkl 
Signed-off-by: @weidongkl
2023-05-26 09:36:12 +00:00
zhangpan
bce6e67b6e update to 2.38
(cherry picked from commit 059846ced2cbe16f5df3ca9315a1366808738eef)
2023-05-06 15:10:34 +08:00
openeuler-ci-bot
bc4f3a7c7e
!13 【轻量级 PR】:Rebuild for next release
From: @zhouwenpei 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-10-28 08:59:26 +00:00
zhouwenpei
4094a0a8bd
Rebuild for next release
Signed-off-by: zhouwenpei <zhouwenpei050@chinasoftinc.com>
2022-10-27 09:24:56 +00:00
openeuler-ci-bot
fe382cb858 !7 [sync] PR-5: upgrade to 2.33
From: @openeuler-sync-bot
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
2021-12-06 10:48:06 +00:00
wangkerong
b804d4daae version update to 2.33
(cherry picked from commit fe44bc6c036b3aa27b5af875b05a9a821913b591)
2021-12-06 16:12:49 +08:00
5 changed files with 133 additions and 38 deletions

View File

@ -1,27 +0,0 @@
From c8d68304c826567f27f5a913dd38f6e045b81483 Mon Sep 17 00:00:00 2001
From: Pritam Baral <pritam@pritambaral.com>
Date: Thu, 11 Jun 2020 04:02:27 +0000
Subject: [PATCH xkeyboard-config] Fix symbols/in syntax error: spurious git
conflict marker
Introduced in https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/93ea944c2599584a4dd1add1725fafd19fef2535#904fcb1a2ae93630fa2905a7fd0ced3f8e50a6e8_2329_2329
---
symbols/in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/symbols/in b/symbols/in
index 3ca78a2..b3a5ca9 100644
--- a/symbols/in
+++ b/symbols/in
@@ -2326,7 +2326,7 @@ xkb_symbols "marathi" {
key <AB09> { [ period, U0964, U0965, U093d ] };
key <AB10> { [ U092f, question, slash, question ] };
};
-=======
+
// EXTRAS:
// Modi is an ancient Indian script that is used to write texts in Marathi, Hindi and Sanskrit.
--
2.26.2

View File

@ -0,0 +1,101 @@
From f7e5a8c0ec9801554fec74ac8fc575523e3f6779 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 29 Jun 2023 10:17:16 +1000
Subject: [PATCH] meson: run the pytest test suite as part of meson test
If pytest is available, run the test suite during meson test.
This requires a bit of fiddling around because the test suite expects
the XKB directory to be properly laid out but that doesn't happen with
meson until install. Luckily all we need to do here is copy our KcCGST
directories over to the build directory and then we can use that as
XKB_CONFIG_ROOT for pytest.
An optional hook for pytest-xdist is integrated too - on my machine the
test run goes from 25s to 10s with xdist on -n auto. This does require
a conftest.py so we don't hog all the cores available on the CI runners.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reference:https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/f7e5a8c0ec9801554fec74ac8fc575523e3f6779
Conflict:NA
---
meson.build | 28 ++++++++++++++++++++++++++++
tests/conftest.py | 16 ++++++++++++++++
tests/copydir.sh | 5 +++++
3 files changed, 49 insertions(+)
create mode 100644 tests/conftest.py
create mode 100755 tests/copydir.sh
diff --git a/meson.build b/meson.build
index 91a4b4c3..4bb3a08d 100644
--- a/meson.build
+++ b/meson.build
@@ -58,4 +58,32 @@ if xsltproc.found()
endif
+# pytest suite
+pymod = import('python')
+python = pymod.find_installation('python3',
+ modules: ['pytest'],
+ required: false)
+pytest = find_program('pytest-3', 'pytest', required: false)
+enable_pytest = python.found() and pytest.found()
+if enable_pytest
+ pytest_args = ['--verbose', '--log-level=DEBUG']
+ # use pytest xdist if available, it really speeds up the tests cases
+ optional_python_modules = ['xdist']
+ if pymod.find_installation('python3', modules: optional_python_modules, required: false).found()
+ pytest_args += ['-n', 'auto']
+ endif
+
+ # copy our data files over to the build directory so we can use the
+ # builddir as XKB_CONFIG_ROOT
+ foreach dir: ['compat', 'geometry', 'keycodes', 'symbols', 'types']
+ run_command('tests/copydir.sh', dir, check: true)
+ endforeach
+
+ test('pytest', pytest,
+ args: pytest_args,
+ env: ['XKB_CONFIG_ROOT=@0@'.format(meson.build_root())],
+ workdir: meson.source_root(),
+ timeout: 60)
+endif
+
subdir('po')
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 00000000..9befeb7a
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,16 @@
+import os
+import sys
+from pathlib import Path
+
+tests_dir = Path(__file__).parent.resolve()
+sys.path.insert(0, str(tests_dir))
+
+try:
+ import xdist # noqa: F401
+
+ # Otherwise we get unknown hook 'pytest_xdist_auto_num_workers'
+ def pytest_xdist_auto_num_workers(config):
+ return os.getenv("FDO_CI_CONCURRENT", None)
+
+except ImportError:
+ pass
diff --git a/tests/copydir.sh b/tests/copydir.sh
new file mode 100755
index 00000000..6f48c1fc
--- /dev/null
+++ b/tests/copydir.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -ex
+
+dir="$1"
+mkdir -p "$MESON_BUILD_ROOT/$MESON_SUBDIR"
+cp -r "$MESON_SOURCE_ROOT/$MESON_SUBDIR/$dir/" "$MESON_BUILD_ROOT/$MESON_SUBDIR/"
--
GitLab

Binary file not shown.

Binary file not shown.

View File

@ -1,16 +1,16 @@
Name: xkeyboard-config Name: xkeyboard-config
Version: 2.30 Version: 2.38
Release: 1 Release: 3
Summary: The X Keyboard Extension Summary: The X Keyboard Extension
License: MIT License: MIT
URL: https://www.freedesktop.org/wiki/Software/XKeyboardConfig URL: https://www.freedesktop.org/wiki/Software/XKeyboardConfig
Source0: https://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-%{version}.tar.bz2 Source0: https://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-%{version}.tar.xz
Patch01: 0001-Fix-symbols-in-syntax-error-spurious-git-conflict-ma.patch Patch6000: backport-run-the-pytest-test-suite-as-part-of-meson-test.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: gettext gettext-devel libtool libxslt perl(XML::Parser) pkgconfig(glib-2.0) xkbcomp BuildRequires: gettext gettext-devel libtool libxslt perl(XML::Parser) pkgconfig(glib-2.0) xkbcomp meson
BuildRequires: pkgconfig(x11) >= 1.4.3 pkgconfig(xorg-macros) >= 1.12 pkgconfig(xproto) >= 7.0.20 BuildRequires: pkgconfig(x11) >= 1.4.3 pkgconfig(xorg-macros) >= 1.12 pkgconfig(xproto) >= 7.0.20 pytest
%description %description
The non-arch keyboard configuration database for X Window. The goal is to The non-arch keyboard configuration database for X Window. The goal is to
@ -30,13 +30,16 @@ Header files for xkeyboard-config
%prep %prep
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version} -p1
# fix taiwan to china taiwan
sed -i 's|Taiwanese|Chinese Taiwan|' po/* rules/base.xml symbols/cn symbols/sun_vndr/tw symbols/tw
sed -i 's|Taiwan)|Taiwan China)|' po/* geometry/sun rules/base.xml symbols/tw
%build %build
autoreconf -v --force --install || exit 1 %meson -Dcompat-rules=true -Dxorg-rules-symlinks=true
%configure --enable-compat-rules --with-xkb-base=%{_datadir}/X11/xkb --with-xkb-rules-symlink=xorg %meson_build
%make_build
%install %install
%make_install %meson_install
{ {
FILESLIST=${PWD}/files.list FILESLIST=${PWD}/files.list
@ -46,6 +49,9 @@ autoreconf -v --force --install || exit 1
popd popd
} }
%check
%meson_test
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS %doc AUTHORS
@ -59,10 +65,25 @@ autoreconf -v --force --install || exit 1
%files help %files help
%defattr(-,root,root) %defattr(-,root,root)
%doc README docs/README.* docs/HOWTO.* TODO NEWS %doc README docs/README.* docs/HOWTO.* NEWS
%{_mandir}/man7/xkeyboard-config.* %{_mandir}/man7/xkeyboard-config.*
%changelog %changelog
* Mon Dec 11 2023 zhangpan <zhangpan103@h-partners.com> - 2.38-3
- enable make check
* Sat May 06 2023 leeffo <liweiganga@uniontech.com> - 2.38-2
- fix taiwan to china taiwan
* Mon Feb 06 2023 zhangpan <zhangpan@h-partners.com> - 2.38-1
- update to 2.38
* Wed Oct 26 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 2.33-2
- Rebuild for next release
* Sat Nov 27 2021 wangkerong<wangkerong@huawei.com> - 2.33-1
- update to 2.33-1
* Mon Jul 20 2020 chengguipeng<chengguipeng1@huawei.com> - 2.30-1 * Mon Jul 20 2020 chengguipeng<chengguipeng1@huawei.com> - 2.30-1
- Upgrade to 2.30-1 - Upgrade to 2.30-1