Commit 32ecbd31 authored by Drew Parsons's avatar Drew Parsons
Browse files

add debian patch enable_nose_args.patch

allows arguments to be provided to the nosetests executable.

Used to specify the python version running nose
(specify pythonX.Y as "nose executable", then provide "-m nose" as
noseargs).

Closes: #943473.
parent 0968e194
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
odil (0.10.0-9) UNRELEASED; urgency=medium

  * Team upload.
  * debian patch enable_nose_args.patch allows arguments to be
    provided to the nosetests executable. Used to specify the python
    version running nose. Closes: #943473.

 -- Drew Parsons <dparsons@debian.org>  Sat, 16 Nov 2019 03:50:01 +0800

odil (0.10.0-8) unstable; urgency=medium

  * Team upload.
+24 −0
Original line number Diff line number Diff line
--- a/tests/run
+++ b/tests/run
@@ -23,6 +23,8 @@
     parser.add_argument("--exclude-regex", "-E", help="C++ only")
     parser.add_argument(
         "--nose", default="nosetests", help="nosetests executable")
+    parser.add_argument(
+        "--noseargs", default="", help="optional arguments for nosetests executable")
     parser.add_argument("--exclude", "-e", help="Python only")
     arguments = parser.parse_args()
 
@@ -76,8 +78,10 @@
         ctest.append("-V")
     cpp_code = subprocess.call(ctest+cpp_args, env=environment)
 
-    nose = [
-        arguments.nose, os.path.join(source_directory, "tests", "wrappers")]
+    nose = [ arguments.nose ]
+    if arguments.noseargs:
+        nose += arguments.noseargs.split()
+    nose.append(os.path.join(source_directory, "tests", "wrappers"))
     if arguments.verbose:
         nose.append("-v")
     python_code = subprocess.call(nose+python_args, env=environment)
+1 −0
Original line number Diff line number Diff line
remove-soname-in-wrappers.patch
enable_nose_args.patch
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	  ln -sr ./wrappers/python/*.py ./build/odil; \
	  cd build && \
	    python$${Python} ../tests/run --no-network \
	      --nose nosetests$$(dpkg --compare-versions $${Python} ge 3 && echo "3") \
	      --nose python$${Python} --noseargs "-m nose" \
	      -E ".*"; \
	  cd ..; \
	  rm ./build/odil/*py; \