summaryrefslogtreecommitdiff
path: root/tests/frontend/configuredwarning/plugins/corewarn.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/frontend/configuredwarning/plugins/corewarn.py')
-rw-r--r--tests/frontend/configuredwarning/plugins/corewarn.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/frontend/configuredwarning/plugins/corewarn.py b/tests/frontend/configuredwarning/plugins/corewarn.py
index 1f263a0ce..bb744b0dd 100644
--- a/tests/frontend/configuredwarning/plugins/corewarn.py
+++ b/tests/frontend/configuredwarning/plugins/corewarn.py
@@ -1,3 +1,5 @@
+import os
+
from buildstream import Element
from buildstream.plugin import CoreWarnings
@@ -13,7 +15,7 @@ class CoreWarn(Element):
pass
def configure_sandbox(self, sandbox):
- pass
+ sandbox.mark_directory(self.get_variable('install-root'))
def stage(self, sandbox):
pass
@@ -22,6 +24,14 @@ class CoreWarn(Element):
self.warn("Testing: CoreWarning produced during assemble",
warning_token=CoreWarnings.OVERLAPS)
+ # Return an arbitrary existing directory in the sandbox
+ #
+ rootdir = sandbox.get_directory()
+ install_root = self.get_variable('install-root')
+ outputdir = os.path.join(rootdir, install_root.lstrip(os.sep))
+ os.makedirs(outputdir, exist_ok=True)
+ return install_root
+
def setup():
return CoreWarn