From 0e69485efd4637223b1a138bfebaf5b3ed048bb4 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Tue, 23 Oct 2018 20:34:47 +0000 Subject: clar: provide a way to run some shell before exiting --- tests/main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/main.c b/tests/main.c index b4fccecc4..00b2bae02 100644 --- a/tests/main.c +++ b/tests/main.c @@ -8,6 +8,7 @@ int main(int argc, char *argv[]) #endif { int res; + char *at_exit_cmd; clar_test_init(argc, argv); @@ -28,5 +29,11 @@ int main(int argc, char *argv[]) cl_global_trace_disable(); git_libgit2_shutdown(); + at_exit_cmd = getenv("CLAR_AT_EXIT"); + if (at_exit_cmd != NULL) { + int at_exit = system(at_exit_cmd); + return res || at_exit; + } + return res; } -- cgit v1.2.1