Rebecca N. Palmer pushed to branch main at Debian Med / snakemake


Commits:
42a7c501 by Rebecca N. Palmer at 2023-07-23T16:40:05+01:00
Add timeout to tests (giving a traceback when they hang).

They currently do so in reprotest

- - - - -


3 changed files:

- debian/changelog
- debian/rules
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -2,6 +2,7 @@ snakemake (7.30.2-1) UNRELEASED; urgency=medium
 
   * New upstream release.  Update d/copyright and patches.
   * Skip newly added tests that we can't run.
+  * Add timeout to tests (giving a traceback when they hang).
   * Not uploaded because it uses python3-yte in several places.
 
  -- Rebecca N. Palmer <[email protected]>  Mon, 12 Jun 2023 07:38:54 
+0100


=====================================
debian/rules
=====================================
@@ -8,7 +8,7 @@ export PYBUILD_DESTDIR_python3=debian/snakemake
 # copy the tests and run them from there to avoid having to clean up after them
 export PYBUILD_BEFORE_TEST_python3=chmod +x {dir}/bin/snakemake; cp -r 
{dir}/bin {dir}/tests {build_dir}
 export PYBUILD_AFTER_TEST_python3=rm -fr {build_dir}/bin {build_dir}/tests
-export PYBUILD_TEST_ARGS=python{version} -m pytest -v 
{build_dir}/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_ancient and not 
test_github_issue1062 and not test_symlink_time_handling and not 
test_env_modules and not test_github_issue1460 and not 
test_rule_inheritance_globals'
+export PYBUILD_TEST_ARGS=python{version} -m pytest -o faulthandler_timeout=60 
-v {build_dir}/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_ancient and not 
test_github_issue1062 and not test_symlink_time_handling and not 
test_env_modules and not test_github_issue1460 and not 
test_rule_inheritance_globals'
 
 # Skipped because they download executables (which is forbidden in Debian 
buildd and debci)
 # Snakefile/snakemake-wrapper/CWL scripts: test_cwl, test_cwl_singularity, 
test_url_include, test_wrapper, test_wrapper_local_git_prefix, 
test_module_with_script, test_module_report, test_module_complex(2), 
test_modules_meta_wrapper
@@ -37,7 +37,7 @@ export PYBUILD_TEST_ARGS=python{version} -m pytest -v 
{build_dir}/tests/test*.py
 # possibly an actual bug: test_env_modules
 # should be marked google_credentials: test_github_issue1396
 # needs Azure credentials: test_az_batch_executor
-# test_pipes_fail is done outside the main run in autopkgtest because it 
sometimes hangs
+# the -o faulthandler_timeout=60 is because test_pipes_fail sometimes hangs
 
 export PATH:=$(shell pybuild --print build_dir --interpreter python3 --name 
$(PYBUILD_NAME))/bin:$(PATH)
 


=====================================
debian/tests/run-unit-test
=====================================
@@ -21,8 +21,8 @@ export HOME="${AUTOPKGTEST_TMP}"
 # workaround for #928826
 . /etc/profile.d/modules.sh
 
-#sometimes hangs, so use timeout and retry
-python3 -m pytest -o faulthandler_timeeout=60 -v tests/test*.py -k 
'test_pipes_fail' || python3 -m pytest -o faulthandler_timeeout=60 -v 
tests/test*.py -k 'test_pipes_fail' || python3 -m pytest -o 
faulthandler_timeeout=60 -v tests/test*.py -k 'test_pipes_fail'
-
 #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'
+
+#sometimes hangs, so use timeout and retry
+python3 -m pytest -o faulthandler_timeout=60 -v tests/test*.py -k 
'test_pipes_fail' || python3 -m pytest -o faulthandler_timeout=60 -v 
tests/test*.py -k 'test_pipes_fail' || python3 -m pytest -o 
faulthandler_timeout=60 -v tests/test*.py -k 'test_pipes_fail'



View it on GitLab: 
https://salsa.debian.org/med-team/snakemake/-/commit/42a7c5011bb6a500c1ba609abcd661b3fb9bc60b

-- 
View it on GitLab: 
https://salsa.debian.org/med-team/snakemake/-/commit/42a7c5011bb6a500c1ba609abcd661b3fb9bc60b
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to