From 78733a523a0654d55317889dcf47fb7c0e16155d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 4 Nov 2017 20:53:25 +0100 Subject: [PATCH 1/2] README.md: add CII Best Practices badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c406aca8dc..06fd69142a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ Count of open issues over time Count of open pull requests over time [![Build Status](https://semaphoreci.com/api/v1/projects/28a5a3ca-3c56-4078-8b5e-7ed6ef912e14/443470/shields_badge.svg)](https://semaphoreci.com/systemd/systemd)
-[![Coverity Scan Status](https://scan.coverity.com/projects/350/badge.svg)](https://scan.coverity.com/projects/350) +[![Coverity Scan Status](https://scan.coverity.com/projects/350/badge.svg)](https://scan.coverity.com/projects/350)
+[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1369/badge)](https://bestpractices.coreinfrastructure.org/projects/1369) ## Details From 8f8dc208bec2002d6aec209e73eea55916fbd50e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 4 Nov 2017 21:02:35 +0100 Subject: [PATCH 2/2] HACKING: add a short description of new unit tests This is all "should" and "encouraged", since we are not strict with this, for better or worse. --- HACKING | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/HACKING b/HACKING index d9d2043821..6267c58e22 100644 --- a/HACKING +++ b/HACKING @@ -11,6 +11,15 @@ CODING_STYLE for details. Also have a look at our Contribution Guidelines: https://github.com/systemd/systemd/blob/master/.github/CONTRIBUTING.md +When adding new functionality, tests should be added. For shared functionality +(in src/basic and src/shared) unit tests should be sufficient. The general +policy is to keep tests in matching files underneath src/test, +e.g. src/test/test-path-util.c contains tests for any functions in +src/basic/path-util.c. If adding a new source file, consider adding a matching +test executable. For features at a higher level, tests in src/test/ are very +strongly recommended. If that is no possible, integration tests in test/ are +encouraged. + Please always test your work before submitting a PR. For many of the components of systemd testing is straight-forward as you can simply compile systemd and run the relevant tool from the build directory.