Skip to content

Commit

Permalink
try to fix tests
Browse files Browse the repository at this point in the history
question is why GALAXY_CONFIG_OVERRIDE_FILE_PATH is not set in the tests
  • Loading branch information
bernt-matthias committed Sep 27, 2021
1 parent 0a644bf commit 5a0fedd
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions planemo/galaxy/test/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,18 @@ def run_in_config(ctx, config, run=run_galaxy_command, test_data_target_dir=None
# check if tools created extra files in the file_path all files in the files path
# - end with '.dat' or
# - are contained in a directory `dataset_.*_files`
for (path, dirs, files) in os.walk(config.env["GALAXY_CONFIG_OVERRIDE_FILE_PATH"]):
for name in files:
if not (name.endswith(".dat") or re.match('.*/dataset_.*_files$', path)):
extra_files.append(os.path.join(path, name))
if len(extra_files) > 0:
msg = f"One of the tested tools wrote to Galaxy's files dir: {extra_files}"
for i in range(len(structured_data["tests"])):
structured_data["tests"][i]["data"]["status"] = "failure"
structured_data["tests"][i]["data"]["job"]["stderr"] += msg
error(msg)
ec = 1
if config.env.get("GALAXY_CONFIG_OVERRIDE_FILE_PATH"):
for (path, dirs, files) in os.walk(config.env.get("GALAXY_CONFIG_OVERRIDE_FILE_PATH")):
for name in files:
if not (name.endswith(".dat") or re.match('.*/dataset_.*_files$', path)):
extra_files.append(os.path.join(path, name))
if len(extra_files) > 0:
msg = f"One of the tested tools wrote to Galaxy's files dir: {extra_files}"
for i in range(len(structured_data["tests"])):
structured_data["tests"][i]["data"]["status"] = "failure"
structured_data["tests"][i]["data"]["job"]["stderr"] += msg
error(msg)
ec = 1
return handle_reports_and_summary(
ctx,
structured_data,
Expand Down

0 comments on commit 5a0fedd

Please sign in to comment.