From: Davin McCall Date: Sun, 8 Dec 2019 08:47:44 +0000 (+1000) Subject: dinitcheck: output overall result after checks complete X-Git-Tag: v0.8.0~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5dd769a7f3b59099003c2477a3bece3834530eee;p=oweals%2Fdinit.git dinitcheck: output overall result after checks complete --- diff --git a/src/dinitcheck.cc b/src/dinitcheck.cc index a27a8e4..b074df1 100644 --- a/src/dinitcheck.cc +++ b/src/dinitcheck.cc @@ -204,6 +204,13 @@ int main(int argc, char **argv) // TODO additional: check chain-to, other lint + if (! errors_found) { + std::cout << "No problems found.\n"; + } + else { + std::cout << "One or more errors found.\n"; + } + return errors_found ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/src/igr-tests/check-basic/expected.txt b/src/igr-tests/check-basic/expected.txt index a25578f..43f5cd5 100644 --- a/src/igr-tests/check-basic/expected.txt +++ b/src/igr-tests/check-basic/expected.txt @@ -3,3 +3,4 @@ Service 'boot': Unknown setting: 'not-valid'. Service 'boot': run-as: Specified user id contains invalid numeric characters or is outside allowed range. Checking service: test1... Unable to load service 'test1': Service description not found. +One or more errors found. diff --git a/src/igr-tests/check-cycle/expected.txt b/src/igr-tests/check-cycle/expected.txt index 89dadf8..e39d20e 100644 --- a/src/igr-tests/check-cycle/expected.txt +++ b/src/igr-tests/check-cycle/expected.txt @@ -9,3 +9,4 @@ Found dependency cycle: d -> e -> b. +One or more errors found.