diff --git a/proxy.cpp b/proxy.cpp index ab257771dca92a97e1e9894eaad369f0df831e4c..4c6ee3f88ebc01e4780233cd5cc12ebfad89be22 100755 --- a/proxy.cpp +++ b/proxy.cpp @@ -462,7 +462,12 @@ bool UnitTestContainer::execute(bool enable_valgrind_call) { cout << std::flush; test_execution executor(test, environment, enable_valgrind_call); + return fork_execute(executor); +} +template <typename F> +bool fork_execute(F & executor) +{ // Fork pid_t process_id; process_id = fork(); diff --git a/proxy.h b/proxy.h index 2ae72238ece7e42870dd1357e79a388c9154d5ef..15320b4c6365b5d377bd9c6e5519891106f62172 100755 --- a/proxy.h +++ b/proxy.h @@ -125,6 +125,9 @@ namespace proxy UnitTestContainer(const UnitTestContainer & other); UnitTestContainer & operator=(const UnitTestContainer & other); }; + + template <typename F> + bool fork_execute(F & executor); class test_execution {