-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4256763
commit 48c9741
Showing
2 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
from ccbr_tools.pipeline.nextflow import run | ||
from ccbr_tools.pipeline.hpc import get_hpc | ||
from ccbr_tools.pipeline.hpc import get_hpc, Biowulf, FRCE | ||
from ccbr_tools.shell import exec_in_context | ||
|
||
import tempfile | ||
|
||
|
||
def test_nextflow_basic(): | ||
output = exec_in_context(run, "CCBR/CHAMPAGNE", debug=True) | ||
assert "nextflow run CCBR/CHAMPAGNE" in output | ||
|
||
|
||
def test_nextflow_hpc(): | ||
hpc = get_hpc() | ||
if hpc.name == "biowulf" or hpc.name == "frce": | ||
output = exec_in_context(run, "CCBR/CHAMPAGNE", debug=True) | ||
assert "module load" in output | ||
assert all( | ||
[ | ||
"module load" | ||
in exec_in_context(run, "CCBR/CHAMPAGNE", debug=True, hpc=Biowulf()), | ||
"module load" | ||
in exec_in_context(run, "CCBR/CHAMPAGNE", debug=True, hpc=FRCE()), | ||
] | ||
) | ||
|
||
|
||
def test_nextflow_slurm(): | ||
assert "sbatch submit_slurm.sh" in exec_in_context( | ||
run, "CCBR/CHAMPAGNE", debug=True, hpc=Biowulf(), mode="slurm" | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
print( | ||
exec_in_context(run, "CCBR/CHAMPAGNE", debug=True, hpc=Biowulf(), mode="slurm") | ||
) |