summaryrefslogtreecommitdiffstats
path: root/test/run-integration-tests.sh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test runner: print time before/after testsLuca Boccassi2021-11-221-2/+2
| | | | When a timeout occurs we actually can't see when the test started/stopped. Print the time.
* test: create and merge code coverage reports in integration testsLuca Boccassi2021-10-041-0/+13
| | | | | | | If -Db_coverage=true is used at build time, then ARTIFACT_DIRECTORY/TEST-XX-FOO.coverage-info files are created with code coverage data, and run-integration-test.sh also merges them into ARTIFACT_DIRECTORY/merged.coverage-info since the coveralls.io helpers accept only a single file.
* licensing: add forgotten spdx headersZbigniew Jędrzejewski-Szmek2021-10-011-0/+1
| | | | | Those are all "our" files, but we forgot to add the headers, most likely because of non-standard file extensions.
* test: shellcheck-ify test scriptsFrantisek Sumsal2021-09-301-8/+9
|
* test: Allow running only a subset of integration tests by setting SELECTED_TESTSBalint Reczey2021-05-171-2/+4
|
* test/run-integration-tests.sh: adjust arg processingDan Streetman2021-01-261-28/+54
| | | | | | | The script currently parses either 'clean' or 'clean-again' as wanting to clean both before and after running tests. This fixes that to split the action up; clean runs before tests, clean-again after; and also verifies the parameter(s) before passing them to make.
* test: allow run-integration-tests.sh to run without buildDan Streetman2021-01-261-1/+9
|
* test: find $BUILD_DIR in test-functions, remove from other scriptsDan Streetman2021-01-261-3/+3
| | | | | | | | The $BUILD_DIR is only used in test-functions, and doesn't need to be specified in any other scripts. Additionally, to be able to allow the integration test suite to be run against locally installed binaries, instead of built binaries, moving BUILD_DIR logic completely into test-functions allows later patches to be simpler.
* Do not run ninja in run-integration-tests.shLuca Boccassi2021-01-011-2/+0
| | | | | It is typically ran as root, while builds are done as normal users. It is documented anyway to build beforehand.
* test: fix regex in run-integration-tests.shLuca Boccassi2020-12-191-1/+1
| | | | The regex results in calls of "make setup run -again" which is broken
* test: use deny-list in run-integration-tests.shLuca Boccassi2020-12-191-4/+4
| | | | | The old env var doesn't seem to be used anywhere, and the script currently doesn't work, so it seems safe to change immediately
* test/run-integration-tests: do not run the tests if only "clean" is passedZbigniew Jędrzejewski-Szmek2020-09-221-1/+3
|
* run-integration-tests: only do the clean operation in the beginningZbigniew Jędrzejewski-Szmek2020-03-311-3/+5
| | | | | | | When doing 'make clean', we remove the cached image. So doing 'make -C TEST-NN-foo clean setup run clean-again' in a loop is very slow. Let's filter out the 'clean' target (if specified), and do the cleaning in the beginning, and then run other targets in a loop as before.
* run-integration-tests: print timesZbigniew Jędrzejewski-Szmek2020-03-311-5/+6
|
* run-integration-tests: add support for blacklistingZbigniew Jędrzejewski-Szmek2020-03-311-1/+13
| | | | | | | | | | | This was done downstream in debian and ubuntu [1]. I want to change the downstream file to use run-integration-tests so we can change the way tests work more easily. Let's start moving downstream functionality upstream. $ sudo BLACKLIST_MARKERS='blacklist-ubuntu-ci-arm64 blacklist-ubuntu-ci' \ BUILD_DIR=build test/run-integration-tests.sh [1] https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/tests/upstream
* test: perform partial cleanup after each test is runZbigniew Jędrzejewski-Szmek2020-03-281-1/+1
| | | | | | This causes the unprivileged-nspawn-root directory to be removed after running one test. The advantage is that we reduce the maximum disk-space use quite a bit (47*400 MB → about 18GB).
* test: rework how images are createdZbigniew Jędrzejewski-Szmek2020-03-281-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we'd create a separate image for each test, in /var/tmp/systemd-test.XXXXX/rootdisk.img. Most of the images where very similar, except that each one had some unit files installed specifically for the test. The installation of those custom unit files was removed in previous commits (all the unit files are always installed). The new approach is to only create as few distinct images as possible. We have: default.img: the "normal" image suitable for almost all the tests basic.img: the same as default image but doesn't mask any services cryptsetup.img: p2 is used for encrypted /var badid.img: /etc/machine-id is overwritten with stuff selinux.img: with selinux added for fun and fun and a few others: ls -l build/test/*img lrwxrwxrwx 1 root root 38 Mar 21 21:23 build/test/badid.img -> /var/tmp/systemd-test.PJFFeo/badid.img lrwxrwxrwx 1 root root 38 Mar 21 21:17 build/test/basic.img -> /var/tmp/systemd-test.na0xOI/basic.img lrwxrwxrwx 1 root root 43 Mar 21 21:18 build/test/cryptsetup.img -> /var/tmp/systemd-test.Tzjv06/cryptsetup.img lrwxrwxrwx 1 root root 40 Mar 21 21:19 build/test/default.img -> /var/tmp/systemd-test.EscAsS/default.img lrwxrwxrwx 1 root root 39 Mar 21 21:22 build/test/nspawn.img -> /var/tmp/systemd-test.HSebKo/nspawn.img lrwxrwxrwx 1 root root 40 Mar 21 21:20 build/test/selinux.img -> /var/tmp/systemd-test.daBjbx/selinux.img lrwxrwxrwx 1 root root 39 Mar 21 21:21 build/test/test08.img -> /var/tmp/systemd-test.OgnN8Z/test08.img I considered trying to use the same image everywhere. It would probably be possible, but it would be very brittle. By using separate images where it is necessary we keep various orthogonal modifications independent. The way that images are cached is complicated by the fact that we still want to keep them in /var/tmp. Thus, an image is created on first use and linked to from build/test/ so it can be found by other tests. Tests cannot be run in parallel. I think that is an acceptable limitation. Creation of the images was probably taking more resources then the actual tests, so we should be better off anyway.
* treewide: more portable bash shebangsJörg Thalheim2020-03-051-1/+2
| | | | | | | | | | | | | | | | As in 2a5fcfae024ffc370bb780572279f45a1da3f946 and in 3e67e5c9928f8b1e1c5a63def88d53ed1fed12eb using /usr/bin/env allows bash to be looked up in PATH rather than being hard-coded. As with the previous changes the same arguments apply - distributions have scripts to rewrite shebangs on installation and they know what locations to rely on. - For tests/compilation we should rather rely on the user to have setup there PATH correctly. In particular this makes testing from git easier on NixOS where do not provide /bin/bash to improve compose-ability.
* scripts: use 4 space indentationZbigniew Jędrzejewski-Szmek2019-04-121-19/+19
| | | | | | | | | | | | | | | | | | We had all kinds of indentation: 2 sp, 3 sp, 4 sp, 8 sp, and mixed. 4 sp was the most common, in particular the majority of scripts under test/ used that. Let's standarize on 4 sp, because many commandlines are long and there's a lot of nesting, and with 8sp indentation less stuff fits. 4 sp also seems to be the default indentation, so this will make it less likely that people will mess up if they don't load the editor config. (I think people often use vi, and vi has no support to load project-wide configuration automatically. We distribute a .vimrc file, but it is not loaded by default, and even the instructions in it seem to discourage its use for security reasons.) Also remove the few vim config lines that were left. We should either have them on all files, or none. Also remove some strange stuff like '#!/bin/env bash', yikes.
* tests: clean up again after running tests (#10446)Lennart Poettering2018-10-181-1/+1
| | | | | | | | | | | | | | | | | Currently, if I run the full "run-integration-tests.sh" script it will fail on my machine because it fills up /var/tmp whith just too much crap until the disk is full. Let's make sure that "run-integration-tests.sh" cleans up after every test. For that change the make targets to run from "clean setup run" to "clean setup run clean" — except that that doesn't work since make is smart enough to realize that the same target appears twice on the command line and will only execute it once. Let's fix that by defining another target "clean-again" which is just like "clean", but allows us to be added to the same command line a second time. Then, let's build with "clean setup run clean-again" and all is good. While we are at it, let's also add .PHONY where appropriate, after all these all are phony targets.
* run-integration-tests: show number of tests runLennart Poettering2018-03-231-3/+5
|
* run-integration-tests: show make command line executedLennart Poettering2018-03-231-2/+2
| | | | | That makes it much easier to figure out what to type to just run one specific test for debugging.
* run-integration-test: allow argument to be overridenZbigniew Jędrzejewski-Szmek2017-12-061-1/+6
| | | | This is useful for "sudo test/run-integration-tests.sh clean".
* tests: try to autodetect directory betterZbigniew Jędrzejewski-Szmek2017-12-061-6/+4
| | | | | | | | | | Ignore mkosi.builddir. In the future we can also add other patterns if necessary. run-intergration-tests.sh is updated to use the new script, and modified to work from arbitrary directory. Follow-up for #7494.
* test: add a simple script that runs all our integration tests one after the ↵Lennart Poettering2017-12-051-0/+45
other