[med-svn] [Git][med-team/snakemake][debian-v7] fail tests to get a log, extra debug output
Rebecca N. Palmer (@rnpalmer-guest)
gitlab at salsa.debian.org
Sun Aug 4 14:29:39 BST 2024
Rebecca N. Palmer pushed to branch debian-v7 at Debian Med / snakemake
Commits:
f570e107 by Rebecca N. Palmer at 2024-08-04T14:29:10+01:00
fail tests to get a log, extra debug output
- - - - -
4 changed files:
- debian/changelog
- debian/control
- debian/patches/cancelscript_debug.patch
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,8 +1,8 @@
-snakemake (7.32.4-5) UNRELEASED; urgency=medium
+snakemake (7.32.4-4+ppa1) snakemake7; urgency=medium
- * (salsa-ci test, please do not upload) fail tests to get a log
+ * fail tests to get a log, extra debug output
- -- Rebecca N. Palmer <rebecca_palmer at zoho.com> Sun, 04 Aug 2024 10:55:45 +0100
+ -- Rebecca N. Palmer <rebecca_palmer at zoho.com> Sun, 04 Aug 2024 14:25:13 +0100
snakemake (7.32.4-4) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -9,6 +9,7 @@ Build-Depends: ca-certificates,
dh-python,
pybuild-plugin-pyproject,
environment-modules,
+ glpk-utils [amd64],
imagemagick,
python3,
python3-platformdirs <!nocheck>,
@@ -62,7 +63,7 @@ Homepage: https://snakemake.readthedocs.io/
Rules-Requires-Root: no
Package: snakemake
-Architecture: all
+Architecture: any
Depends: ${misc:Depends},
${python3:Depends},
ca-certificates,
=====================================
debian/patches/cancelscript_debug.patch
=====================================
@@ -36,19 +36,103 @@ Forwarded: not-needed
if not success:
--- a/tests/tests.py
+++ b/tests/tests.py
-@@ -133,6 +133,7 @@ def test_cluster_cancelscript():
+@@ -133,11 +133,13 @@ def test_cluster_cancelscript():
cleanup=False,
sigint_after=4,
)
-+ assert False and os.path.exists(outdir+"/scancel.txt"), str(glob.glob(outdir+'/**/*',recursive=True))
++ assert os.path.exists(outdir+"/scancel.txt"), str(glob.glob(outdir+'/**/*',recursive=True))
scancel_txt = open("%s/scancel.txt" % outdir).read()
scancel_lines = scancel_txt.splitlines()
assert len(scancel_lines) == 1
+ assert scancel_lines[0].startswith("cancel")
+ assert len(scancel_lines[0].split(" ")) == 3
++ assert False, "failing to show the logs, files="+ str(glob.glob(outdir+'/**/*',recursive=True))
+
+
+ @skip_on_windows
@@ -162,6 +163,7 @@ def test_cluster_cancelscript_nargs1():
cleanup=False,
sigint_after=4,
)
-+ assert False and os.path.exists(outdir+"/scancel.txt"), str(glob.glob(outdir+'/**/*',recursive=True))
++ assert os.path.exists(outdir+"/scancel.txt"), str(glob.glob(outdir+'/**/*',recursive=True))
scancel_txt = open("%s/scancel.txt" % outdir).read()
scancel_lines = scancel_txt.splitlines()
assert len(scancel_lines) == 2
+@@ -169,6 +170,7 @@ def test_cluster_cancelscript_nargs1():
+ assert scancel_lines[1].startswith("cancel")
+ assert len(scancel_lines[0].split(" ")) == 2
+ assert len(scancel_lines[1].split(" ")) == 2
++ assert False, "failing to show the logs, files="+ str(glob.glob(outdir+'/**/*',recursive=True))
+
+
+ @skip_on_windows
+@@ -188,11 +190,13 @@ def test15():
+
+ def test_glpk_solver():
+ run(dpath("test_solver"), scheduler_ilp_solver="GLPK_CMD")
++ assert False, "failing to show the logs"
+
+
+ @skip_on_windows
+ def test_coin_solver():
+ run(dpath("test_solver"), scheduler_ilp_solver="COIN_CMD")
++ assert False, "failing to show the logs"
+
+
+ def test_directory():
+--- a/snakemake/exceptions.py
++++ b/snakemake/exceptions.py
+@@ -143,6 +143,7 @@ def print_exception(ex, linemaps):
+ )
+ elif isinstance(ex, KeyboardInterrupt):
+ logger.info("Cancelling snakemake on user request.")
++ traceback.print_exception(type(ex), ex, ex.__traceback__)
+ else:
+ traceback.print_exception(type(ex), ex, ex.__traceback__)
+
+--- a/snakemake/executors/__init__.py
++++ b/snakemake/executors/__init__.py
+@@ -704,6 +704,7 @@ class CPUExecutor(RealExecutor):
+ self.pool.shutdown()
+
+ def cancel(self):
++ logger.info('cancelling CPUExecutor')
+ self.pool.shutdown()
+
+ def _callback(
+@@ -900,6 +901,7 @@ class ClusterExecutor(RealExecutor):
+ shutil.rmtree(self.tmpdir)
+
+ def cancel(self):
++ logger.info('cancelling ClusterExecutor')
+ self.shutdown()
+
+ def _run(self, job: ExecutorJobInterface, callback=None, error_callback=None):
+@@ -1150,6 +1152,7 @@ class GenericClusterExecutor(ClusterExec
+ thread_wait.start()
+
+ def cancel(self):
++ logger.info(f"cancelling with cancelcmd={self.cancelcmd}")
+ def _chunks(lst, n):
+ """Yield successive n-sized chunks from lst."""
+ for i in range(0, len(lst), n):
+@@ -1176,7 +1179,7 @@ class GenericClusterExecutor(ClusterExec
+ )
+ except subprocess.SubprocessError:
+ failures += 1
+- if failures:
++ if True:#failures:
+ logger.info(
+ (
+ "{} out of {} calls to --cluster-cancel failed. This is safe to "
+--- a/snakemake/scheduler.py
++++ b/snakemake/scheduler.py
+@@ -636,7 +636,7 @@ class JobScheduler(JobSchedulerExecutorI
+ self.run(runjobs)
+ except (KeyboardInterrupt, SystemExit):
+ logger.info(
+- "Terminating processes on user request, this might take some time."
++ f"Terminating processes on user request, this might take some time. type={type(self._executor)}"
+ )
+ self._executor.cancel()
+ return False
=====================================
debian/rules
=====================================
@@ -47,9 +47,11 @@ export SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
# LC_ALL is for reproducibility
+# tests here (bypassing nocheck) because this PPA exists to run them in riscv64
execute_after_dh_auto_build:
PYTHONPATH=$(shell pybuild --print build_dir --interpreter python3) \
cd docs && LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 make html
+ . /etc/profile.d/modules.sh && PYBUILD_SYSTEM=custom dh_auto_test || true
execute_after_dh_installdocs:
find debian -name '__pycache__' -o name '.gitignore' | xargs rm -rf
@@ -58,7 +60,6 @@ execute_after_dh_installdocs:
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
python3 -c "import io;print(io.DEFAULT_BUFFER_SIZE)"
- . /etc/profile.d/modules.sh && PYBUILD_SYSTEM=custom dh_auto_test || true
endif
override_dh_auto_clean:
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/f570e107519b21c0f3920f3a2bc9f7c19026c8f3
--
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/f570e107519b21c0f3920f3a2bc9f7c19026c8f3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240804/d84b42f6/attachment-0001.htm>
More information about the debian-med-commit
mailing list