[med-svn] [Git][med-team/python-cobra][master] 3 commits: Add autopkgtests

Mohd Bilal (@rmb) gitlab at salsa.debian.org
Thu Aug 25 19:23:00 BST 2022



Mohd  Bilal pushed to branch master at Debian Med / python-cobra


Commits:
3a244f14 by Mohammed Bilal at 2022-08-25T17:13:53+00:00
Add autopkgtests

- - - - -
4aeb8686 by Mohammed Bilal at 2022-08-25T23:18:28+05:30
remove autopkgtest-pkg-python testsuite

- - - - -
65b2eb53 by Mohammed Bilal at 2022-08-25T23:32:06+05:30
Update test depends

- - - - -


4 changed files:

- debian/control
- − debian/tests/Makefile
- debian/tests/control
- + debian/tests/run-unit-test


Changes:

=====================================
debian/control
=====================================
@@ -2,7 +2,6 @@ Source: python-cobra
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Afif Elghraoui <afif at debian.org>
 Section: python
-Testsuite: autopkgtest-pkg-python
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
                dh-python,


=====================================
debian/tests/Makefile deleted
=====================================
@@ -1,12 +0,0 @@
-
-.ONESHELL:
-
-all: py3-test
-
-py3-test: SHELL=python3
-
-%-test:
-	import sys
-	from cobra.test import test_all
-
-	sys.exit(0) if test_all() == 0 else sys.exit(1)


=====================================
debian/tests/control
=====================================
@@ -1,12 +1,11 @@
-Test-Command:
-	export MAKEFILES="$PWD/debian/tests/Makefile";
-	cd $AUTOPKGTEST_TMP && make py3-test
-Depends:
-	make,
-	python3-cobra,
-	python3-pytest,
-	python3-pytest-benchmark,
-	python3-jsonschema,
-	python3-scipy,
-	python3-sbml5
+Tests: run-unit-test
+Depends: @,
+	 python3-cobra,
+	 python3-pytest,
+	 python3-pytest-benchmark,
+	 python3-jsonschema,
+	 python3-scipy,
+	 python3-sbml5,
+	 python3-pytest-mock,
+	 quilt
 Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,31 @@
+#!/bin/bash
+set -e
+
+pkg=python-cobra
+CUR_DIR=`pwd`
+
+QUILT_PATCHES=debian/patches quilt push -a || true
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a ${CUR_DIR}/tests "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+echo "Running Tests"
+
+for py in $(py3versions -s 2> /dev/null)
+do
+    echo "Testing with $py in $(pwd):"
+    $py -m pytest
+
+done
+
+cd ${CUR_DIR}
+QUILT_PATCHES=debian/patches quilt pop -a || true
+
+echo "PASS"



View it on GitLab: https://salsa.debian.org/med-team/python-cobra/-/compare/dbe74dbbc0d816ad1e9471139decd5a4b1dacc4c...65b2eb532af527399b3ff00c914ef7443ed3a5aa

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-cobra/-/compare/dbe74dbbc0d816ad1e9471139decd5a4b1dacc4c...65b2eb532af527399b3ff00c914ef7443ed3a5aa
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/20220825/c83387b6/attachment-0001.htm>


More information about the debian-med-commit mailing list