Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
451d16eb
Commit
451d16eb
authored
Mar 25, 2013
by
Jelte Jansen
Browse files
[master] Merge branch 'trac2583'
parents
95443028
4660c86f
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/lettuce/README
View file @
451d16eb
...
@@ -70,6 +70,11 @@ These files *will* be overwritten or deleted if the same scenarios are run
...
@@ -70,6 +70,11 @@ These files *will* be overwritten or deleted if the same scenarios are run
again, so if you want to inspect them after a failed test, either do so
again, so if you want to inspect them after a failed test, either do so
immediately or move the files.
immediately or move the files.
If you want to keep these output files even for successful runs, you can
specify the environment variable LETTUCE_KEEP_OUTPUT=1. The files will
still be overwritten by subsequent runs, but they will not automatically be
deleted.
Adding and extending tests
Adding and extending tests
--------------------------
--------------------------
...
...
tests/lettuce/features/terrain/terrain.py
View file @
451d16eb
...
@@ -26,12 +26,16 @@
...
@@ -26,12 +26,16 @@
from
lettuce
import
*
from
lettuce
import
*
import
subprocess
import
subprocess
import
os
.path
import
os
import
shutil
import
shutil
import
re
import
re
import
sys
import
sys
import
time
import
time
# lettuce cannot directly pass commands to the terrain, so we need to
# use environment variables to influence behaviour
KEEP_OUTPUT
=
'LETTUCE_KEEP_OUTPUT'
# In order to make sure we start all tests with a 'clean' environment,
# In order to make sure we start all tests with a 'clean' environment,
# We perform a number of initialization steps, like restoring configuration
# We perform a number of initialization steps, like restoring configuration
# files, and removing generated data files.
# files, and removing generated data files.
...
@@ -109,7 +113,7 @@ class RunningProcess:
...
@@ -109,7 +113,7 @@ class RunningProcess:
self
.
process
=
None
self
.
process
=
None
self
.
step
=
step
self
.
step
=
step
self
.
process_name
=
process_name
self
.
process_name
=
process_name
self
.
remove_files_on_exit
=
True
self
.
remove_files_on_exit
=
(
os
.
environ
.
get
(
KEEP_OUTPUT
)
!=
'1'
)
self
.
_check_output_dir
()
self
.
_check_output_dir
()
self
.
_create_filenames
()
self
.
_create_filenames
()
self
.
_start_process
(
args
)
self
.
_start_process
(
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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