From 5dd769a7f3b59099003c2477a3bece3834530eee Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sun, 8 Dec 2019 18:47:44 +1000 Subject: [PATCH] dinitcheck: output overall result after checks complete --- src/dinitcheck.cc | 7 +++++++ src/igr-tests/check-basic/expected.txt | 1 + src/igr-tests/check-cycle/expected.txt | 1 + 3 files changed, 9 insertions(+) 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. -- 2.25.1