env[var] = value
return env
+ def load_test_module(self):
+ # Base directory is provided by env
+ self.run("modprobe lttng-test")
+
+ def unload_test_module(self, check_return=True):
+ # Base directory is provided by env
+ self.run("modprobe -r lttng-test", check_return=check_return)
+
def close(self):
for key, subp in self.__subprocess.items():
subp.terminate()
stdout.close()
stderr.close()
+ # Always try to remove test module but do not perform check on return
+ # value.
+ self.unload_test_module(False)
+
# Copy the lttng_home used at runtime using hardlink to prevent useless
# data duplication
shutil.copytree(self.lttng_home, self.__post_runtime_lttng_home_path, copy_function=os.link)