Skip to content

Commit 88e3b70

Browse files
committed
adding files to tests/bin
1 parent 15a84b0 commit 88e3b70

File tree

11 files changed

+11
-12
lines changed

11 files changed

+11
-12
lines changed

.github/workflows/qiita-plugin-ci.yml

-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ jobs:
8888
conda activate klp
8989
9090
# creating bcl-convert/sbatch/squeue executable
91-
echo 'echo "$@"' > `pwd`/tests/bin/sbatch
92-
echo 'echo -e "JOBID,STATE\n1234,COMPLETED"' > `pwd`/tests/bin/squeue
93-
chmod +x `pwd`/tests/bin/sbatch `pwd`/tests/bin/squeue `pwd`/tests/bin/bcl-convert
9491
echo `pwd`/tests/bin/ >> "$GITHUB_PATH"
9592
9693
export QIITA_ROOTCA_CERT=`pwd`/qiita-dev/qiita_core/support_files/ci_rootca.crt

src/sequence_processing_pipeline/ConvertJob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def run(self, callback=None):
170170
info = self.parse_logs()
171171
# prepend just the message component of the Error.
172172
info.insert(0, str(e))
173-
raise JobFailedError(info)
173+
raise JobFailedError('\n'.join(info))
174174

175175
self. mark_job_completed()
176176

src/sequence_processing_pipeline/FastQCJob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def run(self, callback=None):
206206
info = self.parse_logs()
207207
# prepend just the message component of the Error.
208208
info.insert(0, str(e))
209-
raise JobFailedError(info)
209+
raise JobFailedError('\n'.join(info))
210210

211211
logging.debug(job_info)
212212

src/sequence_processing_pipeline/MultiQCJob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def run(self, callback=None):
217217
info = self.parse_logs()
218218
# prepend just the message component of the Error.
219219
info.insert(0, str(e))
220-
raise JobFailedError(info)
220+
raise JobFailedError('\n'.join(info))
221221

222222
logging.debug(job_info)
223223

src/sequence_processing_pipeline/NuQCJob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def run(self, callback=None):
265265
info = self.parse_logs()
266266
# prepend just the message component of the Error.
267267
info.insert(0, str(e))
268-
raise JobFailedError(info)
268+
raise JobFailedError('\n'.join(info))
269269

270270
job_id = job_info['job_id']
271271

src/sequence_processing_pipeline/SeqCountsJob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def run(self, callback=None):
8080
info = self.parse_logs()
8181
# prepend just the message component of the Error.
8282
info.insert(0, str(e))
83-
raise JobFailedError(info)
83+
raise JobFailedError('\n'.join(info))
8484

8585
self.mark_job_completed()
8686

src/sequence_processing_pipeline/TRIntegrateJob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def run(self, callback=None):
105105
info = self.parse_logs()
106106
# prepend just the message component of the Error.
107107
info.insert(0, str(e))
108-
raise JobFailedError(info)
108+
raise JobFailedError('\n'.join(info))
109109

110110
self.mark_job_completed()
111111

src/sequence_processing_pipeline/TellReadJob.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ def run(self, callback=None):
9292
info = self.parse_logs()
9393
# prepend just the message component of the Error.
9494
info.insert(0, str(e))
95-
info = str(e)
96-
raise JobFailedError(info)
95+
raise JobFailedError('\n'.join(info))
9796

9897
self.mark_job_completed()
9998

tests/bin/sbatch

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
echo "$@"

tests/bin/squeue

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
echo -e "JOBID,STATE\n1234,COMPLETED"

tests/test_Job.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def my_callback(jid=None, status=None):
5050
obs = job._system_call('ls ' + join(package_root, 'tests', 'bin'),
5151
callback=my_callback)
5252

53-
exp = ['bcl-convert\nbcl2fastq\nfake_squeue.py\nfastqc\n']
53+
exp = ['bcl-convert\nbcl2fastq\nfake_squeue.py\nfastqc\n'
54+
'sbatch\nsqueue\n']
5455

5556
self.assertIn(obs['stdout'], exp)
5657
self.assertEqual(obs['stderr'], '')

0 commit comments

Comments
 (0)