Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
3239f415
Commit
3239f415
authored
Apr 06, 2016
by
anonym
Browse files
Make it possible to run() multiple lines.
parent
a1b76f34
Changes
1
Hide whitespace changes
Inline
Side-by-side
features/support/helpers/dogtail.rb
View file @
3239f415
...
...
@@ -44,10 +44,11 @@ module Dogtail
@components
.
join
(
'.'
)
end
def
run
(
python_expr
=
nil
)
def
run
(
lines
=
nil
)
@opts
[
:user
]
||=
LIVE_USER
python_expr
||=
build_line
script
=
build_script
([
python_expr
])
lines
||=
[
build_line
]
lines
=
[
lines
]
if
lines
.
class
!=
Array
script
=
build_script
(
lines
)
script_path
=
$vm
.
execute_successfully
(
'mktemp'
,
@opts
).
stdout
.
chomp
$vm
.
file_overwrite
(
script_path
,
script
,
@opts
[
:user
])
args
=
[
"/usr/bin/python '
#{
script_path
}
'"
,
@opts
]
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment