Skip to content

Commit da70860

Browse files
committed
do not make a tmp copy of the wrappers, as for planemo serve
1 parent 673d9bb commit da70860

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

planemo/commands/cmd_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Module describing the planemo ``test`` command."""
22
import click
3-
3+
from contextlib import ExitStack
44
from planemo import options
55
from planemo.cli import command_function
66
from planemo.engine.test import (
@@ -66,10 +66,13 @@ def cli(ctx, uris, **kwds):
6666
against that same Galaxy root - but this may not be bullet proof yet so
6767
please careful and do not try this against production Galaxy instances.
6868
"""
69-
with temp_directory(dir=ctx.planemo_directory) as temp_path:
69+
with ExitStack() as stack:
70+
if not kwds["serve"]:
71+
temp_path = stack.enter_context(temp_directory(dir=ctx.planemo_directory))
72+
else:
73+
temp_path = None
7074
# Create temp dir(s) outside of temp, docker can't mount $TEMPDIR on OSX
7175
runnables = for_runnable_identifiers(ctx, uris, kwds, temp_path=temp_path)
72-
7376
# pick a default engine type if needed
7477
is_cwl = all(r.type in {RunnableType.cwl_tool, RunnableType.cwl_workflow} for r in runnables)
7578
if kwds.get("engine", None) is None:
@@ -79,7 +82,6 @@ def cli(ctx, uris, **kwds):
7982
kwds["engine"] = "external_galaxy"
8083
else:
8184
kwds["engine"] = "galaxy"
82-
8385
return_value = test_runnables(ctx, runnables, original_paths=uris, **kwds)
8486

8587
ctx.exit(return_value)

0 commit comments

Comments
 (0)