[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#902780: want way to publish more than one logfile

Package: autopkgtest
Version: 4.4

Right now, autopkgtest basically dumps tests' stderr to its own
stderr.  This results in logs which are very inconvenient to read,
because everything is all jumbled up.

I suggest the following approach:

* Introduce a new option --log-dir which is an alternative to
  --log-file.  When this option is in effect (say, specifying L):

  - stderr from each individual test is written to L/test=<testname>.stderr.log
  - stdout from each individual test is written to L/test=<testname>.stdout.log
  - everything else that ends up in the usual log goes to L/autopkgtest.log

* A new env var AUTOPKGTEST_LOG_DIR is provided to tests.  It is a

  After each test, it is scanned (recursively) for nonexecutable plain
  files, all of whose path components within AUTOPKGTEST_LOG_DIR are
  valid UTF-8 and not dotfiles.

  If --log-dir is specified, the contents of such files are copied to
  L/test=<testname>/.  If the files do not have a suffix that
  autopkgtest knows is safe to dump in a webserver document tree (or
  end in ".autopkgtest.log") ".autopkgtest.log" is appended.
  ("Unsafe" files would imply execution by downloaders or browsers;
  in particular, javascript and html are forbidden.  This should be
  done with a passlist of allowed suffixes.)

  If --log-dir is not specified, for each such file its name is
  reported and the contents spewed to --log-file or autopkgtests's
  stderr, roughly as if the test had printed them to its own stderr.

  The test is entitled to write non-UTF-8 to these logfiles.
  autopkgtest should not check, launder or convert the character set.
  Neither should whatever means are used to publish the files.

* A new restriction needs-log-dir can be declared by tests which
  unconditionally use AUTOPKGTEST_LOG_DIR.


Ian Jackson <ijackson@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply to: