Let Apport ignore unit tests



Hi Martin,

I'm developing software packages under Ubuntu, and some are low-level enough that I need to test assert_fail() / fatal_error() etc implementations.
These functions purposefully end in abort(), so I'm writing unit tests like:

./misctests --assert_return0 || die Testing --assert_return0 failed

However each time my unit test suite is executed, I and other developers on
the project get Apport crash dialogs, even with ulimit -c 0.

Is there a way to disable Apport via e.g. an environment variable in the env of the unit test? Since we're talking about unit tests here, the executables can reside in arbitrary directories (/usr/src/project or ~/project/). And we may not have root privileges during build or execution time, so installing /etc/apport hooks is also out of the question.

I.e. we're looking for a way to disable Apport for an arbitrary executable with a non-root setting local to the executable, like an environment variable.

Any help (or pointer to redirect the discussion) is greatly appreciated.

--
Yours sincerely,
Tim Janik

https://testbit.eu/timj/
Free software author.


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