Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
BuildStream
buildstream
Commits
45df1aaf
Commit
45df1aaf
authored
6 years ago
by
Jim MacArthur
Browse files
Options
Downloads
Patches
Plain Diff
sandbox.py: Add set_output_directory to sandboxes and set it
parent
f60a84e2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
buildstream/buildelement.py
+3
-0
3 additions, 0 deletions
buildstream/buildelement.py
buildstream/sandbox/sandbox.py
+13
-2
13 additions, 2 deletions
buildstream/sandbox/sandbox.py
with
16 additions
and
2 deletions
buildstream/buildelement.py
+
3
−
0
View file @
45df1aaf
...
...
@@ -155,6 +155,9 @@ class BuildElement(Element):
command_dir
=
build_root
sandbox
.
set_work_directory
(
command_dir
)
# Tell sandbox which directory is preserved in the finished artifact
sandbox
.
set_output_directory
(
install_root
)
# Setup environment
sandbox
.
set_environment
(
self
.
get_environment
())
...
...
This diff is collapsed.
Click to expand it.
buildstream/sandbox/sandbox.py
+
13
−
2
View file @
45df1aaf
...
...
@@ -99,9 +99,11 @@ class Sandbox():
self
.
__stdout
=
kwargs
[
'
stdout
'
]
self
.
__stderr
=
kwargs
[
'
stderr
'
]
# Setup the directories. Root should be available to subclasses, hence
# being single-underscore. The others are private to this class.
# Setup the directories. Root and output_directory should be
# available to subclasses, hence being single-underscore. The
# others are private to this class.
self
.
_root
=
os
.
path
.
join
(
directory
,
'
root
'
)
self
.
_output_directory
=
None
self
.
__directory
=
directory
self
.
__scratch
=
os
.
path
.
join
(
self
.
__directory
,
'
scratch
'
)
for
directory_
in
[
self
.
_root
,
self
.
__scratch
]:
...
...
@@ -176,6 +178,15 @@ class Sandbox():
"""
self
.
__cwd
=
directory
def
set_output_directory
(
self
,
directory
):
"""
Sets the output directory - the directory which is preserved
as an artifact after assembly.
Args:
directory (str): An absolute path within the sandbox
"""
self
.
_output_directory
=
directory
def
mark_directory
(
self
,
directory
,
*
,
artifact
=
False
):
"""
Marks a sandbox directory and ensures it will exist
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment