34 lines
1.4 KiB
Plaintext
Executable File
34 lines
1.4 KiB
Plaintext
Executable File
set -e
|
|
|
|
#
|
|
# Test single process auto-execution with parameter mapping
|
|
#
|
|
echo ''
|
|
echo '=== Testing single process auto-execution ==='
|
|
$NXF_RUN --sampleId "SAMPLE_001" --dataFile "../../data/sample_data.txt" --threads "4" | tee stdout
|
|
|
|
# Check that the process executed successfully
|
|
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > analyzeData'` == 1 ]] || false
|
|
|
|
# Check that all parameters were properly mapped and used
|
|
[[ `grep -c 'Single process execution test' stdout` == 1 ]] || false
|
|
[[ `grep -c 'Sample ID: SAMPLE_001' stdout` == 1 ]] || false
|
|
[[ `grep -c 'Data file: sample_data.txt' stdout` == 1 ]] || false
|
|
[[ `grep -c 'Threads: 4' stdout` == 1 ]] || false
|
|
[[ `grep -c 'Processing file with 4 threads' stdout` == 1 ]] || false
|
|
[[ `grep -c 'Analysis completed for sample SAMPLE_001' stdout` == 1 ]] || false
|
|
|
|
# Check that file processing worked (5 lines in sample_data.txt)
|
|
[[ `grep -c '5 sample_data.txt' stdout` == 1 ]] || false
|
|
|
|
#
|
|
# Test with relative path
|
|
#
|
|
echo ''
|
|
echo '=== Testing single process with relative path ==='
|
|
rm -f .nextflow.log # Clear log for clean test
|
|
$NXF_RUN --sampleId "REL_TEST" --dataFile "../../data/sample_data.txt" --threads "2" | tee stdout2
|
|
|
|
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > analyzeData'` == 1 ]] || false
|
|
[[ `grep -c 'Sample ID: REL_TEST' stdout2` == 1 ]] || false
|
|
[[ `grep -c 'Threads: 2' stdout2` == 1 ]] || false |