tox: base test command and positional arguments
[deliverable/lttng-ivc.git] / lttng_ivc / utils / runtime.py
index 83d5a29f4e82acd2ca4f687a0a562d6cd556f916..716617608c50879f98b6a9ea80146e7ed3a8f1e1 100644 (file)
@@ -1,3 +1,23 @@
+# Copyright (c) 2017 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
 import os
 import sys
 import shlex
@@ -7,6 +27,7 @@ import logging
 import shutil
 import contextlib
 import pprint
+import signal
 
 from tempfile import TemporaryDirectory
 
@@ -274,6 +295,7 @@ class Runtime(object):
         # 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)
+        # Hard linking would be nice here but it could be a problem when we use
+        # a tmpdir on another device. Let's consider we have unlimited space.
+        shutil.copytree(self.lttng_home, self.__post_runtime_lttng_home_path,
+                ignore=shutil.ignore_patterns(".lttng"))
This page took 0.024597 seconds and 5 git commands to generate.