Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
c3912d3
tests: move unit tests to tests/unit, add flag --unit to target them
uwla Nov 22, 2023
8ffad83
src: debug: Use a proper string concatenation
rodrigosiqueira Nov 7, 2023
5b1776e
src: debug: Add basic verbose code
rodrigosiqueira Nov 8, 2023
fb19daf
src: config: distinguish variable sources (global/local) in output
uwla Nov 24, 2023
9c37b48
src: checkpatch_wrapper: rename to codestyle
Andregnl Dec 2, 2023
d3b4f11
src: checkpatch_wrapper: Modernize codestyle
Andregnl Dec 2, 2023
4ab86a7
src: config.sh: remove duplicated config entries in config list
uwla Dec 1, 2023
96e243f
documentation: man: features: Add whatis entry
rodrigosiqueira Nov 25, 2023
6f24433
setup.sh: add flag --skip-docs to skip creation of man pages
uwla Dec 1, 2023
68f5923
src: lib: lore: Add pagination support to mailing lists
jppaulo06 Dec 2, 2023
bbb0553
setup.sh: fix --force flag interactive behavior in ArchLinux
uwla Dec 6, 2023
77d6333
src: lib: kw_config_loader: fix not reading line if missing newline char
uwla Dec 1, 2023
9ac7a08
setup.sh: add more short flags
uwla Dec 13, 2023
c32fe38
tests: integration: test kw version on ArchLinux, Debian and Fedora
uwla Dec 18, 2023
333df0e
tests: integration: add local config test
uwla Dec 4, 2023
98f1aab
tests: integration: add basic device test that checks distro
uwla Nov 28, 2023
ac3db7a
documentation: content: tests
uwla Dec 13, 2023
67d04a1
run_tests: allow running tests with the same basename
uwla Dec 19, 2023
a0f8eab
documentation: dependencies: add device-module related dependencies
uwla Dec 20, 2023
1ad9d7b
src: lib: lore: Change /tmp/ to /dev/shm dir
JGBSouza Nov 15, 2023
bdb99c9
tests: unit: lib: lore: Anonymize unit tests
Dec 5, 2023
a97d37f
src: lib: lore: Fix duplication when listing patchsets
Nov 24, 2023
d4c7dcc
src: ui: patch_hub: patchset_details_and_actions: Add bookmarking info
JGBSouza Dec 8, 2023
1764e42
src: deploy: fix preparation of remote directory
jooag Dec 11, 2023
07d895f
src: help.sh: show correct version on repo mode
dummyuser Dec 15, 2023
ff706fa
tests: unit: help: add tests for kw --version
uwla Jan 5, 2024
3bc9eb2
documentation: dependencies: Add libnotify dependency
MarceloSpessoto Jan 3, 2024
8482522
documentation: dependencies: fedora: Fix procps dependency in fedora
jppaulo06 Jan 11, 2024
57f23ab
src: config: Fix values with space separation in `kw config`
jppaulo06 Jan 10, 2024
d8239a1
documentation: content: tests: add instructions for rootless containers
uwla Jan 12, 2024
0a1d636
documentation: tutorials: pomodoro: Update old info
jppaulo06 Jan 15, 2024
a55f6e5
src: kw_remote: Add dashes to remote commands
jppaulo06 Jan 16, 2024
999f5d3
src: _kw: Fix Zsh completion of `kw pomodoro` `--description` option
Jan 17, 2024
1c7372c
src: lib: kwlib: Verbose mode for command substitution
aquilamacedo Jan 22, 2024
e71234d
src: lib: kw_db: Added verbose option to function select_from()
aquilamacedo Nov 21, 2023
8c0c1e7
src: lib: kw_db: Added verbose option to function insert_into()
aquilamacedo Nov 23, 2023
061f977
src: lib: kw_db: Added verbose option to function replace_into()
aquilamacedo Nov 23, 2023
9c9e902
src: lib: kw_db: Added verbose option to function remove_from()
aquilamacedo Nov 23, 2023
41cf7f9
src: lib: dialog_ui: Remove `LC_CTYPE` override for async loading scr…
Jan 30, 2024
5a46b16
tests: integration: Enhance text messages
jppaulo06 Jan 15, 2024
8e4902f
tests: integration: utils: Enhance code readability
jppaulo06 Jan 15, 2024
21d4400
tests: integration: Fix permission denied inside containers due to SE…
jppaulo06 Jan 15, 2024
2426864
src: build: Remove redundant override of `load_build_config`
Feb 7, 2024
addbe77
src: kw_remote: Avoid destroying symbolic links in the add operation
rodrigosiqueira Feb 10, 2024
603eaca
src: kw_remote: Avoid destroy link when use set-default
rodrigosiqueira Feb 10, 2024
825c4c4
src: kw_remote: Ensure that link survive after remote removal
rodrigosiqueira Feb 10, 2024
dbc0b27
src: kw_remote: Avoid destroy symbolic link when use rename
rodrigosiqueira Feb 10, 2024
fa63a6c
src: ui: patch_hub: patchset_details_and_actions: Fix returning from …
Jan 24, 2024
b58c3cd
src: lib: lore: Fix empty message ID bug in `get_patchset_bookmark_st…
Jan 24, 2024
2e35da0
src: lib: lore: Make query filter for Lore request more robust
Jan 24, 2024
aa867af
src: kw_remote: Fix typo in short help
Feb 13, 2024
974e5a3
src: kw_env: Improve env list output
rodrigosiqueira Feb 11, 2024
41c0dea
src: _kw: Revise `kw remote` Zsh completions
Feb 13, 2024
d1556d2
tests: integration: utils: fix container_exec for enhanced command ex…
aquilamacedo Feb 15, 2024
9e40555
kw: remove kw vars
MarceloSpessoto Feb 17, 2024
1dde3ce
tests: integration: device_test: exclude 'Distribution base' field
aquilamacedo Feb 27, 2024
2a63eb1
.github: workflows: integration_tests: integration tests workflow
aquilamacedo Feb 20, 2024
9b1ea6f
github: workflows: *.yml: update the checkout action version
sahil-sagwekar2652 Mar 28, 2024
9a8f319
documentation: man: features: kw-remote: Fix `-s` option
sahil-sagwekar2652 Apr 1, 2024
1ac2c61
src: report: fix the error messages for no data
sahil-sagwekar2652 Apr 2, 2024
358bafa
run_tests.sh: add command to clear test caches
uwla Apr 3, 2024
ce41fae
src: lib: lore: Obtain patch metadata more robustly
Mar 7, 2024
e639380
src: lib: lore: Overhaul processing of representative patches
Mar 7, 2024
9c4a5dd
src: lib: lore: Handle patch not yet processed when electing represen…
Feb 20, 2024
e342a3e
src: lib: lore: Parallelize `process_individual_patches`
Mar 7, 2024
1d6a52f
src: lib: lore: Parallelize `process_representative_patches`
Mar 4, 2024
a0c59f7
src: lib: lore: Revise display of patchset information
Jan 24, 2024
68a2b3a
src: remote: Improve ssh handling in case of failure
rodrigosiqueira Feb 1, 2024
15d40bd
src: lib: kw_db: Update database handling functions for WHERE clauses
JGBSouza Mar 21, 2024
3c11d23
src: lib: kw_db: Add update_into function
JGBSouza Apr 5, 2024
fbf7535
kw: fix unneeded variable redefinition
nahharris Apr 18, 2024
93ac913
tests: unit: lib: lore_test: Replace TEST-MODE with TEST_MODE
rodrigosiqueira Apr 19, 2024
fab60d3
tests: run_tests: Refactor tests main script
uwla Apr 26, 2024
d7c1304
tests: integration: utils: Extract podman commands to functions
uwla Apr 26, 2024
2c4d00b
tests: unit: lib: lore_test: Fix race condition in `test_thread_for_p…
Apr 28, 2024
48cecf1
tests: unit: fix reverse argument order of assert_equals_helper in do…
auyer Apr 27, 2024
71d60eb
documentation: content: codingstyle Add documentation to single quote…
Caio-Dantas Apr 30, 2024
47a04c4
src: Fix codestyle for double quotes
gustavofukunaga May 4, 2024
c2a2388
kw: replace every "#!/bin/bash" shebang with "#!/usr/bin/env bash"
MarceloSpessoto Apr 20, 2024
dc1ce62
add errno error codes to returns that lack them
Argyreos May 9, 2024
518a173
initial Jenkinsfile
MarceloSpessoto May 13, 2024
8fa6366
documentation: man: update man pages to use correct config files
Kaos9001 May 6, 2024
328449c
src: maintainers: Handle multi line MODULE_AUTHOR for --authors
Lincoln-Yuji May 1, 2024
1f050b5
src: explore: add --show-context flag
sahil-sagwekar2652 Apr 1, 2024
0ef682c
src: plugins: kernel_install: utils: clean shellcheck warning SC2294
fernando38954 May 9, 2024
597e567
src: plugins: kernel_install: utils: clean coding style violations
fernando38954 May 8, 2024
e1107bf
src: plugins: subsystems: drm: update code style
FelipeAnibal May 14, 2024
3f68a79
src: plugins: subsystems: drm: check enabled connector
FelipeAnibal May 20, 2024
07136e3
setup: refactor check_dependencies function
aquilamacedo May 24, 2024
eca6482
setup: introduce option to install kernel build dependencies
aquilamacedo May 7, 2024
336f36c
setup: introduce full-installation option
aquilamacedo May 14, 2024
8042ce4
setup: clean string concatenation on usage message
aquilamacedo May 14, 2024
2882bf5
tests: fix reverse argument order of assert_equals_helper and assertE…
BLBispo May 23, 2024
5c24d6b
tests: integration: modify kw_version_test to run entirely in container
aquilamacedo May 13, 2024
021e849
documentation: man: features: kw-build: save-log-to option does not u…
auyer Jun 2, 2024
65fc09e
src: lib: remote: Standardize cmd_remotely with cmd_manager
duzaao Jun 6, 2024
8ff1516
.github: workflows: integration_tests: remove redundant initialize-re…
aquilamacedo Jun 4, 2024
cbd065e
src: build: Add --from-sha <SHA> option
MarceloSpessoto Mar 20, 2024
278cfd4
src: plugins: subsystems: drm: Add after-reboot gui option
cmhpedro May 5, 2024
defa940
tests: unit: maintainers_test: Add failing tests
Lincoln-Yuji May 23, 2024
70f0ac2
Merge remote-tracking branch 'upstream/unstable' into unstable
Jun 14, 2024
e4e385d
src: plugins: kernel_install: utils: add regex support for `kw deploy…
lorenzoberts Apr 30, 2024
6a3a8f8
tests: unit: build_test: improve from_sha tests
MarceloSpessoto Jun 14, 2024
36309b8
setup: Support Zsh completions for setups with ZDOTDIR paths
Lincoln-Yuji Jun 14, 2024
37cad04
src: plugins: subsystems: drm: Correct shellcheck warning
fernando38954 Jun 6, 2024
0211c63
src: plugins: subsystems: drm: show help when running kw drm without …
fernando38954 Jun 6, 2024
8ff5960
src: plugins: subsystems: drm: Remove support for short options lm an…
fernando38954 Jun 6, 2024
a27a0ca
src: plugins: subsystems: drm: add returns to [un]load_module functions
fernando38954 Jun 6, 2024
7896c4b
src: pomodoro: add `--repeat-previous` option to pomodoro
th-duvanel May 28, 2024
db6dd88
Merge remote-tracking branch 'origin/master' into unstable
MarceloSpessoto Jun 20, 2024
e55f7fc
Setup and Doc test prototype
MarceloSpessoto Jun 20, 2024
fe9777e
Shellcheck prototype
MarceloSpessoto Jun 20, 2024
9ff5c4c
Integration test prototype
MarceloSpessoto Jun 20, 2024
b6420c5
run_tests: dedicate a container per test file for integration tests
aquilamacedo Jun 3, 2024
e964402
tests: integration: utils: ensure teardown_single_container works acr…
aquilamacedo Jun 4, 2024
d85cdb7
Use Docker SSH Agent
MarceloSpessoto Jul 9, 2024
fc7a6b8
run_tests: refine test directory logic and variable naming
aquilamacedo Jun 24, 2024
8af8919
src: create build_and_deploy file
BrizaMel Jun 11, 2024
75a7b9d
src: send_patch: Rename `kw mail` to `kw send_patch`
lucasqml May 6, 2024
0f90833
src: device_info: provide kernel description with 'kw device' command
gustavohenriquesr May 6, 2024
a9a9ee2
src: device_info: add cpu architecture info in kw device command
gustavohenriquesr May 6, 2024
5e4bdf3
Adapt some Jenkinsfiles for SSH agents
MarceloSpessoto Jul 11, 2024
9c4712d
tests: integration: utils: Improve error handling in container_exec f…
aquilamacedo Jun 21, 2024
e84a9ca
tests: integration: device_test: modify kw device integration test to…
aquilamacedo Jun 8, 2024
55e1c67
jenkinsfiles: Update Jenkinsfiles for Docker Cloud agents
MarceloSpessoto Jul 28, 2024
c2fcf1e
jenkinsfiles: Install dependencies for setup_and_doc
MarceloSpessoto Jul 28, 2024
0063f6f
jenkinsfiles: Unify install-and-setup and basic agents
MarceloSpessoto Jul 28, 2024
2a495b6
Merge remote-tracking branch 'upstream/unstable' into unstable
MarceloSpessoto Aug 2, 2024
2b803ba
jenkinsfiles: fix shellcheck pipeline
MarceloSpessoto Aug 2, 2024
aab9674
jenkinsfiles: update shellcheck-reviewdog to authenticate with reviewdog
MarceloSpessoto Aug 14, 2024
d9af38d
jenkinsfiles: Use credential for GitHub token
MarceloSpessoto Aug 18, 2024
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
23 changes: 23 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Integration tests
on:
[push, pull_request]

jobs:
integration-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Update the system
run: sudo apt update -y

- name: Install dependencies
run: |
sudo apt install -y shunit2 podman

- name: Integration tests
run: ./run_tests.sh --integration
4 changes: 2 additions & 2 deletions .github/workflows/kcov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 3

Expand All @@ -37,7 +37,7 @@ jobs:
run: |
kcov --include-path=src,kw \
--exclude-pattern=src/bash_autocomplete.sh,src/help.sh \
kcov_out/ ./run_tests.sh
kcov_out/ ./run_tests.sh --unit

- name: Upload coverage do codecov
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck_reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
sh-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run the sh-checker
uses: luizm/action-sh-checker@v0.3.0
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_setup_and_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# This is here just because git-email cannot be installed in the
# Github CI otherwise.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 3

Expand All @@ -30,4 +30,4 @@ jobs:

- name: Unit tests
run: |
./run_tests.sh
./run_tests.sh --unit
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ RUN wget https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellc
&& cp shellcheck-v0.10.0/shellcheck /usr/bin/ \
&& rm -rf shellcheck-v0.10.0

RUN apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl
RUN apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl software-properties-common python3-launchpadlib \
python3-venv python3-pip
#USER kworkflow
24 changes: 24 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pipeline {
agent any
stages {

stage('Build'){
steps{
sh '''
apt update -y
apt install -y kcov shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl
./run_tests.sh prepare
mkdir kcov_out/
git config --global user.email "kw@kworkflow.net"
git config --global user.name "Kworkflow"
./run_tests.sh
kcov --include-path=src,kw \
--exclude-pattern=src/bash_autocomplete.sh,src/help.sh \
kcov_out/ ./run_tests.sh
'''
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'kcov_out/', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
}
}

}
}
12 changes: 6 additions & 6 deletions database/migrate_legacy_data_20220101.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# This file handles the migration of legacy user data, from the old directories and files
# storage, to the new database model
Expand Down Expand Up @@ -99,7 +99,7 @@ function migrate_statistics()
cmd_manager 'SILENT' "mv ${datadir}/statistics ${datadir}/legacy_statistics"
if [[ "$?" != 0 ]]; then
complain "Couldn't rename ${datadir}/statistics ${datadir}/legacy_statistics"
return 1 #EPERM
return 1 # EPERM
fi
}

Expand Down Expand Up @@ -161,7 +161,7 @@ function migrate_pomodoro()
cmd_manager 'SILENT' "mv ${datadir}/pomodoro ${datadir}/legacy_pomodoro"
if [[ "$?" != 0 ]]; then
complain "Couldn't rename ${datadir}/pomodoro ${datadir}/legacy_pomodoro"
return 1 #EPERM
return 1 # EPERM
fi
}

Expand Down Expand Up @@ -216,20 +216,20 @@ function migrate_kernel_configs()
cmd_manager 'SILENT' "cp -r ${configs_dir}/. ${datadir}/configs"
if [[ "$?" != 0 ]]; then
complain "Couldn't copy kernel config files from ${configs_dir} to ${datadir}/configs"
return 1 #EPERM
return 1 # EPERM
fi

# mark migrated directories to avoid duplicated data
cmd_manager 'SILENT' "mv ${datadir}/configs/configs ${datadir}/configs/legacy_configs"
if [[ "$?" != 0 ]]; then
complain "Couldn't rename ${datadir}/configs/configs to ${datadir}/configs/legacy_configs"
return 1 #EPERM
return 1 # EPERM
fi

cmd_manager 'SILENT' "mv ${datadir}/configs/metadata ${datadir}/configs/legacy_metadata"
if [[ "$?" != 0 ]]; then
complain "Couldn't rename ${datadir}/configs/metadata to ${datadir}/configs/legacy_metadata"
return 1 #EPERM
return 1 # EPERM
fi
}

Expand Down
4 changes: 2 additions & 2 deletions documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@
('man/features/kw-drm', 'kw-drm', 'drm subsystem support', [author], 1),
('man/features/kw-explore', 'kw-explore', 'git grep wrapper', [author], 1),
('man/features/kw-init', 'kw-init', 'initialize kworkflow.config', [author], 1),
('man/features/kw-mail', 'kw-mail', 'git send-email wrapper', ['Rubens Gomes Neto'], 1),
('man/features/kw-send-patch', 'kw-send-patch', 'git send-email wrapper', ['Rubens Gomes Neto'], 1),
('man/features/kw-maintainers', 'kw-maintainers', 'display module maintainers', [author], 1),
('man/features/kw-pomodoro', 'kw-pomodoro', 'pomodoro style time management', [author], 1),
('man/features/kw-report', 'kw-report', 'user data report support', [author], 1),
('man/features/kw-ssh', 'kw-ssh', 'ssh access', [author], 1),
('man/features/kw-vars', 'kw-vars', 'view kw config values', [author], 1),
('man/features/kw-vm', 'kw-vm', 'commands to work with QEMU VMs', [author], 1),
('man/features/kw-self-update', 'kw-self-update', 'kw self-update mechanism', ['David Tadokoro, Everaldo Junior'], 1),
('man/features/kw-patch-hub', 'kw-patch-hub', 'UI with lore.kernel.org archives', ['David Tadokoro, Rodrigo Siqueira'], 1),
('man/features/kw-bd', 'kw-bd', 'build and then deploy the kernel', ['Briza Mel de Sousa, Lorenzo Salvador'], 1),
]


Expand Down
22 changes: 20 additions & 2 deletions documentation/content/codingstyle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ a developer. We also encourage using the ``assert_equals_helper`` helper
function, which provides a wrapper capable of spitting a useful error message
in case the assertion fails. Ideally, one should do either::

assert_equals_helper "$error_message" "($LINENO)" "$output" "$expected_output"
assert_equals_helper "$error_message" "($LINENO)" "$expected_output" "$output"

or::

assertEquals "($LINENO)" "$output" "$expected_output"
assertEquals "($LINENO)" "$expected_output" "$output"

Help functions
--------------
Expand Down Expand Up @@ -280,6 +280,18 @@ it stays consistent across multiple platforms. If you need to add extra lines
while generating a string you can use the ``$'\n'`` literal to add a new line
character or other special characters.

Single quotes instead double quotes
-----------------------------------

Whenever you have a variable that stands for a string that doesn’t contain
shell expansions, use single quotes instead of double quotes. For example::

var='literal-value' #Single quotes

or::

path="${HOME}/path/to/file" #Double quotes

String concatenation
--------------------

Expand Down Expand Up @@ -317,6 +329,12 @@ Good::

rsync --verbose --recursive dir1 dir2

Declaring shebangs
------------------

Avoid using "#!/bin/bash" when writing new bash files. This usual shebang may not work for
some linux distributions that don't follow FHS, such as NixOS. Use "#!/usr/bin/env bash" instead.

Conclusion
----------

Expand Down
2 changes: 1 addition & 1 deletion documentation/content/project_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Components

We treat every feature under kw as a specific component, usually with a
dedicated file. For example, the deploy feature implementation can be seen in
the `src/deploy.sh` file and the mail implementation in the `src/mail.sh` file.
the `src/deploy.sh` file and the mail implementation in the `src/send_patch.sh` file.
Usually, the component file follows this basic structure (see :ref:`code-style
<coding-style>` for more details):

Expand Down
46 changes: 44 additions & 2 deletions documentation/content/tests.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
===============
About Tests
About Tests
===============

.. _tests:
Expand All @@ -9,6 +9,12 @@ Kw's tests rely on `shunit2`. The `run_tests.sh` script automatically detects
can have shunit2 source code in `tests/` (you can clone it from
https://github.com/kward/shunit2).

In order to run the integration tests, it is necessary to install Podman and to
configure it to run in rootless mode as explained in the official documentation:
https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md.
Podman is available via the default package manager of popular distros, such as
Arch, Debian, Fedora and those based on them.

If you want to run all the tests, try::

./run_tests.sh
Expand All @@ -19,7 +25,43 @@ List all available test files::

Or run individual tests with::

./run_tests.sh test TESTFILE1 ...
./run_tests.sh test TEST_FILE_1 ...

To limit the scope of the tests, pass the flag `--unit` or `--integration` as
the first argument to any of the examples above. So, the syntax is::

./run_tests.sh [scope] [command] [args]

Where `[scope]` can be `--unit` or `--integration`. The placeholder `[command]`
can be either `list`, `test` or simply omitted in order to run all tests. Here
are some examples:

.. code-block:: bash

./run_tests.sh --unit # run all unit tests
./run_tests.sh --unit list # list all unit tests
./run_tests.sh --unit test device # test device unit test
./run_tests.sh --unit clear-cache # clear unit tests cache
./run_tests.sh --integration # run all integration tests
./run_tests.sh --integration list # list all integration tests
./run_tests.sh --integration test device # test device integration test
./run_tests.sh --integration clear-cache # clear integration tests cache
./run_tests.sh # run all tests
./run_tests.sh list # list all tests
./run_tests.sh test device # run all device tests
./run_tests.sh clear-cache # clear all cache

The integration tests can take over 10 minutes to run in the first time because
podman is building the container images to be used in the tests, which requires
installing kw's dependencies in the supported distros. After the images have
been built and cached, running the integration tests should take only a few
seconds each time.

Then, the local kw repo is copied to the containers and installed again, which
takes very few seconds. For optimization purposes, the containers are reused
across tests. If you add a new commit or checkout to another branch, such that
HEAD points to another commit, the containers will be destroyed and created
again in order to install the current local version of kw.

Kw is already prepared to run tests, build the documentation and check the
installation in the github workflow.
3 changes: 3 additions & 0 deletions documentation/dependencies/arch.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ curl
perl-xml-xpath
coreutils
b4
procps-ng
pciutils
libnotify
3 changes: 3 additions & 0 deletions documentation/dependencies/debian.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ curl
libxml-xpath-perl
coreutils
b4
procps
pciutils
libnotify-bin
3 changes: 3 additions & 0 deletions documentation/dependencies/fedora.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ curl
perl-XML-XPath
coreutils
b4
procps-ng
pciutils
libnotify
17 changes: 17 additions & 0 deletions documentation/dependencies/kernel_build/arch.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
make
base-devel
linux-headers
bison
flex
openssl
ncurses
pahole
xmlto
kmod
inetutils
bc
libelf
cpio
perl
tar
xz
20 changes: 20 additions & 0 deletions documentation/dependencies/kernel_build/debian.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
libncurses-dev
gawk
flex
bison
openssl
libssl-dev
dkms
libelf-dev
libudev-dev
libpci-dev
libiberty-dev
autoconf
llvm
exuberant-ctags
build-essential
xmlto
kmod
dwarves
clang
lld
12 changes: 12 additions & 0 deletions documentation/dependencies/kernel_build/fedora.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
qt3-devel
libXi-devel
diffutils
gcc-c++
ncurses-devel
bison
flex
openssl-devel
elfutils-libelf-devel
openssl
dwarves
llvm
8 changes: 4 additions & 4 deletions documentation/man/features/kw-backup.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=========
kw-backup
=========
=============================================
kw-backup - Save and restore kw internal data
=============================================

.. _backup-doc:

Expand Down Expand Up @@ -45,4 +45,4 @@ save it into /documents/backup, then run::
To restore a backup, use the `\--restore` option. Suppose you want to restore the
backup stored in /documents/backup/kw-backup-from-yesterday.tar.gz, run::

kw backup --restore /documents/backup/kw-backup-from-yesterday.tar.gz
kw backup --restore /documents/backup/kw-backup-from-yesterday.tar.gz
Loading