[PATCH] D76829: [lit] Introduce setup and teardown routines
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 19:51:17 PDT 2020
delcypher added inline comments.
================
Comment at: llvm/utils/lit/lit/LitConfig.py:71
+ self._suite_setup_callbacks = []
+ self._suite_teardown_callbacks = []
+
----------------
Is `suite` really the best name here? IIUC a lit invocation can discover multiple test suites but the callbacks in this patch aren't executed when a suite starts/finishes. IIUC the implementation calls the setup calls backs before any tests run and then calls the teardown callbacks after all tests have been executed. In that sense the callbacks are actually global to the entire lit invocation, even though the callbacks originate from a particular suite.
Wouldn't `_global_setup_callbacks` (or `_global_pre_test_callbacks`) and `_global_teardown_callbacks` (or `_global_post_test_callbacks`) with similar changes elsewhere be a more descriptive name?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76829/new/
https://reviews.llvm.org/D76829
More information about the llvm-commits
mailing list