{"push_id":2894528082,"size":1,"distinct_size":1,"ref":"refs/heads/test-runner","head":"2612027917d8f37dab5049b9616e35d92d1bf21d","before":"0b66e6bf07719d6f6e8679a5fa464f8da4a1e72e","commits":[{"sha":"2612027917d8f37dab5049b9616e35d92d1bf21d","author":{"name":"Zbigniew Jędrzejewski-Szmek","email":"1a002461b1932d3892b64879e6e8987274fa7074@in.waw.pl"},"message":"tests: add a runner for installed tests\n\nWe have \"installed tests\", but don't provide an easy way to run them.\nI looked for an existing tool that would be able to run our binaries.\n\nThe protocol is very simple: each test must return 0 for success, 77 means\n\"skipped\", anything else is an error. In addition, we want to print test\noutput only if the test failed.\n\nI wrote this simple script. It is pretty basic, but allows running the tests,\nchecking for the skip return value and only prints the test output on failure.\nSince it is written in python it should be easy to add option parsing\n(like running only specific tests, or running unsafe tests, etc.)\n\nI looked at the following alternatives:\n- Ubuntu root-unittests: this works, but just dumps all output to the terminal,\n  has no coloring.\n- @ssahani's test runner\n  There was one at some point in https://github.com/systemd/systemd-fedora-ci,\n  but the repo was force-pushed and it's gone now. Anyway, it was using\n  the unittest library and the test suite was implented as a class, so … no.\n- cram [2,3]\n  cram runs our tests, but does not understand the \"ignore the output\" part,\n  has not support for our magic skip code (it uses hardcoded 80 instead),\n  and seems dead upstream.\n- meson test\n  Here the idea would be to provide an almost-empty meson.build file under\n  /usr/lib/systemd/tests/ that would just define all the tests. This would\n  allow us to reuse the test runner we use normally. Unfortunately meson requires\n  a build directory and configuration to be done before running tests. This\n  would be possible, but seems a lot of effort to just run a few binaries.\n\n[1] https://salsa.debian.org/systemd-team/systemd/blob/242c96addb06480ec9cd75248a5660f37a17b4b9/debian/tests/root-unittests\n[2] https://bitheap.org/cram/\n[3] https://pypi.org/project/pytest-cram/\n\nFixes #10069.","distinct":true,"url":"https://api.github.com/repos/keszybz/systemd/commits/2612027917d8f37dab5049b9616e35d92d1bf21d"}]}
{"actor":{"display_login":"keszybz"}}