]> code.ossystems Code Review - openembedded-core.git/commit
runtime/cases/logrotate: make test more reliable
authorAnuj Mittal <anuj.mittal@intel.com>
Wed, 19 Jun 2019 03:13:26 +0000 (11:13 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 19 Jun 2019 12:07:25 +0000 (13:07 +0100)
commitd0a30c1c57edc9a724658e2ed312b34eed3af5a9
treee561f5782d694f58c40f24822907a4416e40df27
parentb071a1a209556158bcfcc20e3c8bd4b15373767c
runtime/cases/logrotate: make test more reliable

By default logrotate uses 'dateext' in logrotate.conf which results in a
date string being appended at the end of log name. In cases when a test
that installs configuration in logrotate.d is executed first (dnf for
example), it might result in errors when logrotate test is executed:

error: destination /var/log/dnf.librepo.log-20190528 already exists, skipping rotation
error: destination /var/log/dnf.rpm.log-20190528 already exists, skipping rotation
error: destination /var/log/hawkey.log-20190528 already exists, skipping rotation

Tweak the test to use it's own temporary configuration that doesn't
enable dateext.

Fixes [YOCTO #13363]

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/logrotate.py