Skip to content

Commit

Permalink
do not make a tmp copy of the wrappers, as for planemo serve
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbray committed Oct 15, 2021
1 parent 673d9bb commit dfaa792
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions planemo/commands/cmd_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Module describing the planemo ``test`` command."""
from contextlib import ExitStack

import click

from planemo import options
Expand Down Expand Up @@ -66,10 +68,13 @@ def cli(ctx, uris, **kwds):
against that same Galaxy root - but this may not be bullet proof yet so
please careful and do not try this against production Galaxy instances.
"""
with temp_directory(dir=ctx.planemo_directory) as temp_path:
with ExitStack() as stack:
if not kwds["serve"]:
temp_path = stack.enter_context(temp_directory(dir=ctx.planemo_directory))
else:
temp_path = None
# Create temp dir(s) outside of temp, docker can't mount $TEMPDIR on OSX
runnables = for_runnable_identifiers(ctx, uris, kwds, temp_path=temp_path)

# pick a default engine type if needed
is_cwl = all(r.type in {RunnableType.cwl_tool, RunnableType.cwl_workflow} for r in runnables)
if kwds.get("engine", None) is None:
Expand All @@ -79,7 +84,6 @@ def cli(ctx, uris, **kwds):
kwds["engine"] = "external_galaxy"
else:
kwds["engine"] = "galaxy"

return_value = test_runnables(ctx, runnables, original_paths=uris, **kwds)

ctx.exit(return_value)

0 comments on commit dfaa792

Please sign in to comment.