BioLockJ-Dev-Team / sheepdog_testing_suite

Test suite for BioLockJ development team.
3 stars 8 forks source link

Add the STOP module #294

Closed IvoryC closed 3 years ago

IvoryC commented 3 years ago

A handy hack: While testing out the first several modules in a pipeline, I don't want to progress to the remaining modules. If it makes it through the first 5, I want it to jus stop after that. I don't want to take the time to comment out all remaining modules and later un-comment them.

So, in the config file, after my modules of interest, I added a stop:

#BioModule biolockj.module.diy.GenMod AS STOP
STOP.launcher=/bin/bash
STOP.scriptPath=./stop.sh

The file stop.sh:

#! /bin/bash
exit 1

The non-zero exit causes BioLockJ to treat this module as "failed" thus stopping the pipeline.

This was so handy, I think it would be worth while to have a minimalist module that does just this, so the config file would just have this stop line after my modules of interest:

#BioModule biolockj.module.Stop

This minimalist module takes no parameters, is a script module, but makes no scripts. In check dependencies it checks nothing, just prints a warning saying that it absolutely will fail, truncating the pipeline. Its execute task is to throw an Exception that ends the pipeline.

This basically is the "ConfigToFail" module from the test suite, but without even that much configuration.

IvoryC commented 3 years ago

This module has been merged into master as of pull request: "Stop #69", It will be part of release 1.3.14.