From a515c55c8fcd2dc1a8f93f4a46ac91b7c40ab6da Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 14 Sep 2018 14:42:13 -0500 Subject: [PATCH] tests: introduce `test_atexit` When running the p4 daemon or `git daemon`, we want to kill it at the end of the test script. So far, we do this "manually". However, in the next few commits we want to teach the test suite to optionally re-run scripts with different options, therefore we will have to have a consistent way to stop daemons. Let's introduce `test_atexit`, which is loosely modeled after `test_when_finished` (but has a broader scope: rather than running the commands after the current test case, run them when the test script finishes, and also run them when the `--immediate` option is in effect). Signed-off-by: Johannes Schindelin