[med-svn] [Git][med-team/snakemake][debian-v7] Tests: make test_*_solver actually call the solver.

Rebecca N. Palmer (@rnpalmer-guest) gitlab at salsa.debian.org
Sun Aug 4 15:37:04 BST 2024



Rebecca N. Palmer pushed to branch debian-v7 at Debian Med / snakemake


Commits:
1111d784 by Rebecca N. Palmer at 2024-08-04T15:36:43+01:00
Tests: make test_*_solver actually call the solver.

- - - - -


4 changed files:

- debian/changelog
- debian/patches/cancelscript_debug.patch
- debian/patches/series
- + debian/patches/test_solver.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,9 @@
 snakemake (7.32.4-4+ppa1) unstable; urgency=medium
 
   * fail tests to get a log, extra debug output
+  * Tests: make test_*_solver actually call the solver.
 
- -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Sun, 04 Aug 2024 15:17:21 +0100
+ -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Sun, 04 Aug 2024 15:34:39 +0100
 
 snakemake (7.32.4-4) unstable; urgency=medium
 


=====================================
debian/patches/cancelscript_debug.patch
=====================================
@@ -50,7 +50,7 @@ Forwarded: not-needed
  
  
  @skip_on_windows
-@@ -162,6 +163,7 @@ def test_cluster_cancelscript_nargs1():
+@@ -162,6 +164,7 @@ def test_cluster_cancelscript_nargs1():
          cleanup=False,
          sigint_after=4,
      )
@@ -58,7 +58,7 @@ Forwarded: not-needed
      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():
+@@ -169,6 +172,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
@@ -66,7 +66,7 @@ Forwarded: not-needed
  
  
  @skip_on_windows
-@@ -188,11 +190,13 @@ def test15():
+@@ -188,11 +192,13 @@ def test15():
  
  def test_glpk_solver():
      run(dpath("test_solver"), scheduler_ilp_solver="GLPK_CMD")
@@ -136,7 +136,7 @@ Forwarded: not-needed
              )
              self._executor.cancel()
              return False
-@@ -762,6 +762,7 @@ class JobScheduler(JobSchedulerExecutorInterface):
+@@ -762,6 +762,7 @@ class JobScheduler(JobSchedulerExecutorI
                  "Using greedy selector because only single job has to be scheduled."
              )
              return self.job_selector_greedy(jobs)
@@ -144,7 +144,7 @@ Forwarded: not-needed
  
          with self._lock:
              if not self.resources["_cores"]:
-@@ -925,6 +926,7 @@ class JobScheduler(JobSchedulerExecutorInterface):
+@@ -925,6 +926,7 @@ class JobScheduler(JobSchedulerExecutorI
          finally:
              os.environ["PATH"] = old_path
          solver.msg = self.workflow.verbose


=====================================
debian/patches/series
=====================================
@@ -19,3 +19,4 @@ no_mix_tabs_spaces.patch
 fstring.patch
 1068010_appdirs_to_platformdirs.patch
 cancelscript_debug.patch
+test_solver.patch


=====================================
debian/patches/test_solver.patch
=====================================
@@ -0,0 +1,44 @@
+Description: Make test_solver actually call the solver
+
+(i.e. have more than 1 job that could be run first)
+
+Related to (but not a fix for) https://launchpad.net/bugs/1928940
+
+Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
+Forwarded: no
+
+--- a/tests/test_solver/Snakefile
++++ b/tests/test_solver/Snakefile
+@@ -2,7 +2,7 @@ shell.executable("bash")
+ 
+ rule all:
+     input:
+-        "test.out"
++        "test.out", "test1.out", "test2.out"
+ 
+ rule a:
+     output:
+@@ -17,3 +17,15 @@ rule b:
+         "test.out"
+     shell:
+         "echo test1 > {output}"
++
++rule c1:
++    output:
++        "test1.out"
++    shell:
++        "echo test > {output}"
++
++rule c2:
++    output:
++        "test2.out"
++    shell:
++        "echo test > {output}"
+--- /dev/null
++++ b/tests/test_solver/expected-results/test1.out
+@@ -0,0 +1 @@
++test1
+--- /dev/null
++++ b/tests/test_solver/expected-results/test2.out
+@@ -0,0 +1 @@
++test1



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

-- 
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/1111d7844a4667e98c7b582d1ee66c5481214738
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/9b9d4296/attachment-0001.htm>


More information about the debian-med-commit mailing list