pmbootstrap/test
Johannes Marbach ac4c967e18
pmbootstrap lint: avoid looping and copying files (MR 2100)
Before this commit, package folders were copied into the chroot one by
one in order to run apkbuild-lint on them. This logic is replaced by
mounting pmaports.git into the chroot and using a single apkbuild-lint
invocation to lint the supplied packages.

Both of these changes result in a performance improvement, especially
when linting multiple packages at once.

Before this change:

    $ time ./pmbootstrap.py -q lint $(cd ../pmaports/cross; echo *) \
        > /dev/null

    real    0m5,261s
    user    0m7,046s
    sys     0m1,842s

Using the pmaports.git mount but calling apkbuild-lint in a loop:

    $ time ./pmbootstrap.py -q lint $(cd ../pmaports/cross; echo *) \
        > /dev/null

    real    0m4,089s
    user    0m6,418s
    sys     0m1,219s

After this change:

    $ time ./pmbootstrap.py -q lint $(cd ../pmaports/cross; echo *) \
        > /dev/null

    real    0m3,518s
    user    0m5,968s
    sys     0m0,959s

Additionally, running apkbuild-lint from the pmaports.git mount point
has the benefit that every printed violation contains a nice source
identifier à la "./cross/grub-x86/APKBUILD". This makes it possible to
differentiate between different packages even though only a single
apkbuild-lint invocation is used.

Relates: postmarketOS/pmaports#564
2021-09-03 10:52:50 -07:00
..
pmb_test treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
testdata pmb.aportgen.gcc: sync makedepends of gcc aportgen to upstream (MR 2092) 2021-08-10 01:16:54 +03:00
pytest.ini CI: drop support for cached venv + ci runner (MR 2080) 2021-07-04 22:51:53 +02:00
static_code_analysis.sh test/static_code_analysis.sh: update E501 check (MR 2058) 2021-06-06 19:21:31 +02:00
test_apk_static.py enforce E501 in test/ (MR 2058) 2021-06-06 19:21:31 +02:00
test_aportgen.py pmb.aportgen: use correct arch for gcc aportgen (MR 2068) 2021-06-13 02:17:28 +03:00
test_aportgen_device_wizard.py test/aportgen_device_wizard: use armv7 in test instead of armhf (MR 2054) 2021-06-13 15:05:24 +03:00
test_bootimg.py bootimg_analyze: Add support for boot header version 3 (MR 2073) 2021-07-07 04:43:24 +03:00
test_build_is_necessary.py enforce E501 in test/ (MR 2058) 2021-06-06 19:21:31 +02:00
test_build_package.py enforce E501 in test/ (MR 2058) 2021-06-06 19:21:31 +02:00
test_chroot_interactive_shell.py enforce E501 in test/ (MR 2058) 2021-06-06 19:21:31 +02:00
test_config_init.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_config_pmaports.py Replace pmaports channels stable, stable-next (MR 2032) 2021-03-18 18:58:13 +01:00
test_config_user.py enforce E501 in test/ (MR 2058) 2021-06-06 19:21:31 +02:00
test_config_workdir.py Replace pmaports channels stable, stable-next (MR 2032) 2021-03-18 18:58:13 +01:00
test_cross_compile_distcc.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_crossdirect.py test: fix crossdirect rust test (MR 2071) 2021-06-14 23:07:03 +02:00
test_envkernel.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_file.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_folder_size.py pmb.helpers.other.folder_size: use kilobytes (MR 2074) 2021-06-28 02:07:55 +03:00
test_frontend.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_helpers_git.py Replace pmaports channels stable, stable-next (MR 2032) 2021-03-18 18:58:13 +01:00
test_helpers_lint.py pmbootstrap lint: avoid looping and copying files (MR 2100) 2021-09-03 10:52:50 -07:00
test_helpers_package.py test/test_helpers_package: use armv7 instead of armhf (MR 2054) 2021-06-13 15:05:27 +03:00
test_helpers_pmaports.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_helpers_repo.py Replace pmaports channels stable, stable-next (MR 2032) 2021-03-18 18:58:13 +01:00
test_helpers_repo_missing.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_helpers_status.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_helpers_ui.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_install.py install: allow to use last block for embedding (MR 2069) 2021-06-26 20:11:42 +02:00
test_kconfig_check.py kconfig check: add support for checking zram options (MR 2075) 2021-06-23 21:17:41 -07:00
test_keys.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_mount.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_newapkbuild.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_parse_apkbuild.py pmb: Introduce support for "unmaintained" devices (MR 2018) 2021-02-05 00:39:16 +01:00
test_parse_apkindex.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_parse_depends.py test_parse_depends: adjust to hello-world bump (MR 2028) 2021-02-11 23:36:46 +01:00
test_parse_deviceinfo.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_pkgrel_bump.py enforce E501 in test/ (MR 2058) 2021-06-06 19:21:31 +02:00
test_qemu_running_processes.py CI: drop support for cached venv + ci runner (MR 2080) 2021-07-04 22:51:53 +02:00
test_questions.py pmbootstrap init: Add mirror choice (MR 2035) 2021-06-27 18:38:01 +02:00
test_run_core.py pmb.helpers.run_core.kill_commands: use minimal subset of ps parameters (MR 2074) 2021-06-28 02:07:55 +03:00
test_shell_escape.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_version.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
test_version_validate.py treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00