8 Commits

Author SHA1 Message Date
Rainer Gerhards
68a00b0bd5
add capability to write full config file (-o cmdline option)
Introduces the capability to create an output config file that explodes
all "includes" into a single file. This provides a much better overview
of how exactly the configuration is crafted. That could often be a great
troubleshooting aid.

This commit also contains some slight not-really-related cleanup.

closes https://github.com/rsyslog/rsyslog/issues/3634
2019-04-28 11:52:51 +02:00
Rainer Gerhards
69ef6e329b fix bad bash coding style and disable shellcheck false positives
Also now permit interactivly running tests without explicitly setting
$srcdir. This now works if we are inside ./tests and fails, as before,
when we are in a different directory.

Detected by shellcheck via CodeFactor.io
2018-10-23 13:27:37 +02:00
Rainer Gerhards
a45f3af81d squash: wait until full startup so that imdiag.port exists 2018-09-05 09:21:42 +02:00
Rainer Gerhards
b5a385a13d testbench: modernize plumbing
another set of changes for testbench modernization
2018-09-02 17:29:39 +02:00
Rainer Gerhards
5a7d6009c7
testbench: some minor improvements
- DEAD_PORT now uses unassigned IANA port unlike to be used on the system
  (dynamic port querying is racy and we had at least once an issue, so we
  can remove ambiguity here easily)
- replace some diag.sh commands by bash functions
2018-08-19 08:35:19 +02:00
Rainer Gerhards
2ba3c8ddde
testbench: modernize testbench plumbing
changes some of the test commands to use bash functions
includes some small bug fixes to tests where bugs were
previously not seen due to different plumbing.
2018-07-23 17:26:34 +02:00
Rainer Gerhards
e27b59634c enable better testing via "make distcheck"
Also a couple of changes to testbench worth mentioning:
* use cp -f to ensure files can be overwirtten in VBUILD
* fix issue of missing include test file in EXTRA_DIST
* new supressions
* testbench: try to use local system dependency cache
  avoid going to Internet repos if not absolutely necessary. For
  development containers, they should be pre-populated with the
  important dependencies.
* do not enable libfaketime if ASAN is selected
  unfortunately, libfaketime does not work in that case

see also https://github.com/rsyslog/rsyslog/issues/174
2018-07-11 15:01:55 +02:00
Rainer Gerhards
6327e43ea9 config: add include() script object
This permits to include files (like legacy $IncludeConfig) via a
script object. Needless to say, the script object offers more
features:

- include files can now be
  - required, with rsyslog aborting when not present
  - required, with rsyslog emitting an error message but otherwise
    continuing when not present
  - optional, which means non-present include files will be
    skipped without notice
  This is controlled by the "mode" parameter.
- text can be included form e.g. an environment variable
  --> ex: include(text=`echo $ENVVAR`)

This finally really obsoletes $IncludeConfig.

closes https://github.com/rsyslog/rsyslog/issues/2151
2018-01-22 18:36:03 +01:00