[med-svn] [Git][med-team/snakemake][debian-v7] more debug output
Rebecca N. Palmer (@rnpalmer-guest)
gitlab at salsa.debian.org
Sat Aug 3 12:59:39 BST 2024
Rebecca N. Palmer pushed to branch debian-v7 at Debian Med / snakemake
Commits:
f025a8ed by Rebecca N. Palmer at 2024-08-03T12:59:00+01:00
more debug output
- - - - -
6 changed files:
- debian/changelog
- debian/patches/cancelscript_debug.patch
- debian/patches/series
- − debian/patches/test_piperead.patch
- debian/rules
- debian/tests/run-unit-test
Changes:
=====================================
debian/changelog
=====================================
@@ -1,9 +1,10 @@
-snakemake (7.32.4-4) UNRELEASED; urgency=medium
+snakemake (7.32.4-4) unstable; urgency=medium
* Skip tests that crash in persistent_dict because
Debian's pytools is too old (workaround for #1076925).
+ * Tests: add extra debug output to test_cluster_cancel*.
- -- Rebecca N. Palmer <rebecca_palmer at zoho.com> Sat, 03 Aug 2024 12:20:32 +0100
+ -- Rebecca N. Palmer <rebecca_palmer at zoho.com> Sat, 03 Aug 2024 12:58:10 +0100
snakemake (7.32.4-3) unstable; urgency=medium
=====================================
debian/patches/cancelscript_debug.patch
=====================================
@@ -7,13 +7,29 @@ Forwarded: not-needed
--- a/tests/common.py
+++ b/tests/common.py
-@@ -251,6 +251,10 @@ def run(
+@@ -204,6 +204,7 @@ def run(
+ if not shellcmd.startswith("snakemake"):
+ raise ValueError("shellcmd does not start with snakemake")
+ shellcmd = "{} -m {}".format(sys.executable, shellcmd)
++ run_stdout = ""
+ try:
+ if sigint_after is None:
+ subprocess.run(
+@@ -226,6 +227,7 @@ def run(
+ process.send_signal(signal.SIGINT)
+ time.sleep(2)
+ success = process.returncode == 0
++ run_stdout = process.stdout.read().decode()
+ except subprocess.CalledProcessError as e:
+ success = False
+ print(e.stdout.decode(), file=sys.stderr)
+@@ -251,6 +253,10 @@ def run(
)
if shouldfail:
+ if shellcmd and "cancel" in shellcmd:
-+ import io;print("buffer size",io.DEFAULT_BUFFER_SIZE)
-+ #print("cancel stdout:",run_stdout,run_stdout2,"\nWorkdir:")
++ import io
++ print("buffer size",io.DEFAULT_BUFFER_SIZE,"cancel stdout:",run_stdout,"\nWorkdir:")
+ print_tree(tmpdir, exclude=".snakemake/conda")
assert not success, "expected error on execution"
else:
=====================================
debian/patches/series
=====================================
@@ -18,5 +18,4 @@ skip-test_workflow_calling.patch
no_mix_tabs_spaces.patch
fstring.patch
1068010_appdirs_to_platformdirs.patch
-#test_piperead.patch
cancelscript_debug.patch
=====================================
debian/patches/test_piperead.patch deleted
=====================================
@@ -1,28 +0,0 @@
-Description: Don't fail tests if the pipe buffer is small
-
-(too small for the test stdout+stderr;
-unknown if this is why test_cluster_cancel* are failing on riscv64)
-
-Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
-Forwarded: no
-
---- a/tests/common.py
-+++ b/tests/common.py
-@@ -222,9 +222,15 @@ def run(
- stderr=subprocess.STDOUT,
- stdout=subprocess.PIPE,
- ) as process:
-- time.sleep(sigint_after)
-+ try:
-+ run_stdout,_=process.communicate(timeout=sigint_after)
-+ except TimeoutExpired as e:
-+ run_stdout=e.stdout
- process.send_signal(signal.SIGINT)
-- time.sleep(2)
-+ try:
-+ run_stdout2,_=process.communicate(timeout=2)
-+ except TimeoutExpired as e:
-+ run_stdout2=e.stdout
- success = process.returncode == 0
- except subprocess.CalledProcessError as e:
- success = False
=====================================
debian/rules
=====================================
@@ -57,6 +57,7 @@ execute_after_dh_installdocs:
# the modules.sh is a workaround for #928826; putting it in PYBUILD_BEFORE_TEST_python3 doesn't work
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
endif
=====================================
debian/tests/run-unit-test
=====================================
@@ -21,6 +21,8 @@ export HOME="${AUTOPKGTEST_TMP}"
# workaround for #928826
. /etc/profile.d/modules.sh
+python3 -c "import io;print('buffer size',io.DEFAULT_BUFFER_SIZE)"
+
#See debian/rules for why these are excluded
python3 -m pytest -v tests/test*.py -k 'not test_cwl and not test_cwl_singularity and not test_url_include and not test_wrapper and not test_issue1083 and not test_github_issue78 and not test_container and not test_singularity and not test_singularity_conda and not test_convert_to_cwl and not test_report and not test_report_zip and not test_archive and not test_jupyter_notebook and not test_conda and not test_upstream_conda and not test_conda_custom_prefix and not test_script and not test_issue635 and not test_issue1093 and not test_default_resources and not test_default_remote and not test_remote and not test_output_file_cache_remote and not test_tibanna and not test_module_complex and not test_module_complex2 and not test_module_with_script and not test_module_report and not test_modules_meta_wrapper and not test_tes and not test_deploy_script and not test_deploy_hashing and not test_peppy and not test_modules_peppy and not test_report_display_code and not test_wrapper_local_git_prefix and not test_github_issue1396 and not test_az_batch_executor and not test_modules_prefix and not test_env_modules and not test_github_issue1062 and not test_pipes_fail and not test_ancient and not test_symlink_time_handling and not test_github_issue1460 and not test_rule_inheritance_globals and not test_prebuilt_conda_script'
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/f025a8ed6706c967007ae88cb0ba9bf7ba8bdd2f
--
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/f025a8ed6706c967007ae88cb0ba9bf7ba8bdd2f
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/20240803/fbe2848e/attachment-0001.htm>
More information about the debian-med-commit
mailing list