Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running using tmt #123

Merged
merged 7 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .fmf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fmf

Flexible Metadata Format ([doc](https://fmf.readthedocs.io/en/stable/overview.html#description))
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run:
shell: bash

needs: buildcheck
needs: buildCheck

steps:
- name: Repository checkout
Expand Down
5 changes: 5 additions & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ jobs:
trigger: pull_request
targets:
- fedora-all

- job: tests
trigger: pull_request
targets:
- fedora-all
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ install:
done && test -z "$$fail"

check: alternatives
./test-alternatives.sh
TEST_PATH=./ ./tests/alternatives/test-alternatives.sh

tag:
@git tag -a -m "Tag as $(TAG)" -f $(TAG)
Expand Down
11 changes: 10 additions & 1 deletion chkconfig.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ Release: 1%{?dist}
License: GPL-2.0-only
URL: https://github.com/fedora-sysv/chkconfig
Source: https://github.com/fedora-sysv/chkconfig/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: newt-devel gettext popt-devel libselinux-devel beakerlib gcc systemd-devel make

BuildRequires: gcc gettext libselinux-devel make newt-devel popt-devel systemd-devel
# beakerlib might not be available on CentOS Stream any more
%if 0%{?fedora}
BuildRequires: beakerlib
%endif

Conflicts: initscripts <= 5.30-1

Provides: /sbin/chkconfig
Expand Down Expand Up @@ -42,8 +48,11 @@ system at the same time.
%build
%make_build RPM_OPT_FLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"

# tests are executed using tmt and tf on CentOS Stream and RHEL
%if 0%{?fedora}
%check
make check
%endif

%install
rm -rf $RPM_BUILD_ROOT
Expand Down
5 changes: 5 additions & 0 deletions plans/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
summary: Tests
discover:
how: fmf
execute:
how: tmt
121 changes: 63 additions & 58 deletions po/chkconfig.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-23 13:27+0100\n"
"POT-Creation-Date: 2024-01-09 12:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -325,254 +325,259 @@ msgstr ""
msgid " --altdir <directory> --admindir <directory>\n"
msgstr ""

#: ../alternatives.c:292
#: ../alternatives.c:293
#, c-format
msgid "reading %s\n"
msgstr ""

#: ../alternatives.c:297
#: ../alternatives.c:298
#, c-format
msgid "failed to open %s: %s\n"
msgstr ""

#: ../alternatives.c:305
#: ../alternatives.c:306
#, c-format
msgid "failed to read %s: %s\n"
msgstr ""

#: ../alternatives.c:313
#: ../alternatives.c:314
#, c-format
msgid "%s empty!\n"
msgstr ""

#: ../alternatives.c:322
#: ../alternatives.c:323
#, c-format
msgid "bad mode on line 1 of %s\n"
msgstr ""

#: ../alternatives.c:329
#: ../alternatives.c:330
#, c-format
msgid "bad primary link in %s\n"
msgstr ""

#: ../alternatives.c:341
#: ../alternatives.c:342
#, c-format
msgid "path %s unexpected in %s\n"
msgstr ""

#: ../alternatives.c:350
#: ../alternatives.c:351
#, c-format
msgid "missing path for follower %s in %s\n"
msgstr ""

#: ../alternatives.c:360
#: ../alternatives.c:361
#, c-format
msgid "unexpected end of file in %s\n"
msgstr ""

#: ../alternatives.c:369
#: ../alternatives.c:370
#, c-format
msgid "path to alternate expected in %s\n"
msgstr ""

#: ../alternatives.c:370 ../alternatives.c:396 ../alternatives.c:408
#: ../alternatives.c:426 ../alternatives.c:446
#: ../alternatives.c:371 ../alternatives.c:397 ../alternatives.c:409
#: ../alternatives.c:427 ../alternatives.c:447
#, c-format
msgid "unexpected line in %s: %s\n"
msgstr ""

#: ../alternatives.c:394
#: ../alternatives.c:395
#, c-format
msgid "closing '@' missing or the family is empty in %s\n"
msgstr ""

#: ../alternatives.c:407
#: ../alternatives.c:408
#, c-format
msgid "numeric priority expected in %s\n"
msgstr ""

#: ../alternatives.c:425
#: ../alternatives.c:426
#, c-format
msgid "follower path expected in %s\n"
msgstr ""

#: ../alternatives.c:454
#: ../alternatives.c:456
#, c-format
msgid "failed to read link %s: %s\n"
msgstr ""

#: ../alternatives.c:470
#: ../alternatives.c:472
#, c-format
msgid "link points to no alternative -- setting mode to manual\n"
msgstr ""

#: ../alternatives.c:475
#: ../alternatives.c:477
#, c-format
msgid "link changed -- setting mode to manual\n"
msgstr ""

#: ../alternatives.c:512 ../alternatives.c:519
#: ../alternatives.c:517 ../alternatives.c:524
#, c-format
msgid "would remove %s\n"
msgstr ""

#: ../alternatives.c:514 ../alternatives.c:523 ../alternatives.c:570
#: ../alternatives.c:519 ../alternatives.c:528 ../alternatives.c:581
#, c-format
msgid "failed to remove link %s: %s\n"
msgstr ""

#: ../alternatives.c:541 ../alternatives.c:563
#: ../alternatives.c:547
#, c-format
msgid "would link %s -> %s\n"
msgid "failed to link %s -> %s: %s exists and it is not a symlink\n"
msgstr ""

#: ../alternatives.c:550 ../alternatives.c:576
#: ../alternatives.c:552
#, c-format
msgid "failed to link %s -> %s: %s\n"
msgid ""
"failed to link %s -> %s: --keep-foreign was set and link %s points outside "
"%s\n"
msgstr ""

#: ../alternatives.c:559
#: ../alternatives.c:556 ../alternatives.c:574
#, c-format
msgid ""
"failed to link %s -> %s: %s exists and it is either not a symlink or --keep-"
"foreign was set and link points outside %s\n"
msgid "would link %s -> %s\n"
msgstr ""

#: ../alternatives.c:565 ../alternatives.c:587
#, c-format
msgid "failed to link %s -> %s: %s\n"
msgstr ""

#: ../alternatives.c:609
#: ../alternatives.c:620
#, c-format
msgid "%s already exists\n"
msgstr ""

#: ../alternatives.c:611
#: ../alternatives.c:622
#, c-format
msgid "failed to create %s: %s\n"
msgstr ""

#: ../alternatives.c:644
#: ../alternatives.c:655
#, c-format
msgid "failed to replace %s with %s: %s\n"
msgstr ""

#: ../alternatives.c:672 ../alternatives.c:678 ../alternatives.c:690
#: ../alternatives.c:697
#: ../alternatives.c:683 ../alternatives.c:689 ../alternatives.c:701
#: ../alternatives.c:708
#, c-format
msgid "running %s\n"
msgstr ""

#: ../alternatives.c:770
#: ../alternatives.c:781
#, c-format
msgid "link %s incorrect for follower %s (%s %s)\n"
msgstr ""

#: ../alternatives.c:844 ../alternatives.c:881 ../alternatives.c:1095
#: ../alternatives.c:1126
#: ../alternatives.c:855 ../alternatives.c:892 ../alternatives.c:1106
#: ../alternatives.c:1137
#, c-format
msgid "%s has not been configured as an alternative for %s\n"
msgstr ""

#: ../alternatives.c:862
#: ../alternatives.c:873
#, c-format
msgid "%s has not been configured as an follower alternative for %s (%s)\n"
msgstr ""

#: ../alternatives.c:920
#: ../alternatives.c:931
#, c-format
msgid "the primary link for %s must be %s\n"
msgstr ""

#: ../alternatives.c:972
#: ../alternatives.c:983
#, c-format
msgid "%s - status is auto.\n"
msgstr ""

#: ../alternatives.c:974
#: ../alternatives.c:985
#, c-format
msgid "%s - status is manual.\n"
msgstr ""

#: ../alternatives.c:976
#: ../alternatives.c:987
#, c-format
msgid " link currently points to %s\n"
msgstr ""

#: ../alternatives.c:981
#: ../alternatives.c:992
#, c-format
msgid "family %s "
msgstr ""

#: ../alternatives.c:982
#: ../alternatives.c:993
#, c-format
msgid "priority %d\n"
msgstr ""

#: ../alternatives.c:984
#: ../alternatives.c:995
#, c-format
msgid " follower %s: %s\n"
msgstr ""

#: ../alternatives.c:989
#: ../alternatives.c:1000
#, c-format
msgid "Current `best' version is %s.\n"
msgstr ""

#: ../alternatives.c:1024
#: ../alternatives.c:1035
#, c-format
msgid "There is %d program that provides '%s'.\n"
msgstr ""

#: ../alternatives.c:1025
#: ../alternatives.c:1036
#, c-format
msgid "There are %d programs which provide '%s'.\n"
msgstr ""

#: ../alternatives.c:1029
#: ../alternatives.c:1040
#, c-format
msgid " Selection Command\n"
msgstr ""

#: ../alternatives.c:1044
#: ../alternatives.c:1055
#, c-format
msgid "Enter to keep the current selection[+], or type selection number: "
msgstr ""

#: ../alternatives.c:1048
#: ../alternatives.c:1059
#, c-format
msgid ""
"\n"
"error reading choice\n"
msgstr ""

#: ../alternatives.c:1075
#: ../alternatives.c:1086
#, c-format
msgid "cannot access %s/%s: No such file or directory\n"
msgstr ""

#: ../alternatives.c:1142
#: ../alternatives.c:1153
#, c-format
msgid "(would remove %s\n"
msgstr ""

#: ../alternatives.c:1144
#: ../alternatives.c:1155
#, c-format
msgid "failed to remove %s: %s\n"
msgstr ""

#: ../alternatives.c:1312
#: ../alternatives.c:1323
#, c-format
msgid "--family can't contain the symbol '@'\n"
msgstr ""

#: ../alternatives.c:1374
#: ../alternatives.c:1385
#, c-format
msgid "altdir %s invalid\n"
msgstr ""

#: ../alternatives.c:1379
#: ../alternatives.c:1390
#, c-format
msgid "admindir %s invalid\n"
msgstr ""

#: ../alternatives.c:1389
#: ../alternatives.c:1400
#, c-format
msgid "alternatives version %s\n"
msgstr ""
Loading
Loading