From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3F5B2138202 for ; Tue, 2 Jul 2013 21:09:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A4B07E07F4; Tue, 2 Jul 2013 21:09:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B046BE09B9 for ; Tue, 2 Jul 2013 21:09:32 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BC99533E830 for ; Tue, 2 Jul 2013 21:09:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E02AAE5464 for ; Tue, 2 Jul 2013 21:09:28 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1372799278.eeb1f8f01069f88a8619c47c6794697677b8b421.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: / X-VCS-Repository: proj/R_overlay X-VCS-Files: run_tests.py run_tests.sh X-VCS-Directories: / X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: eeb1f8f01069f88a8619c47c6794697677b8b421 X-VCS-Branch: gsoc13/next Date: Tue, 2 Jul 2013 21:09:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0a2712a7-370e-45e8-a004-0fa08762b518 X-Archives-Hash: a8914d1b15bc7d882200bd6575981152 Message-ID: <20130702210928.5Fckb0zis5bt2ED1egP23plK3474o1y7T89U3jEziwM@z> commit: eeb1f8f01069f88a8619c47c6794697677b8b421 Author: André Erdmann mailerd de> AuthorDate: Tue Jul 2 21:07:58 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Tue Jul 2 21:07:58 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=eeb1f8f0 run_tests.sh/run_tests.py run_tests.py runs some tests from roverlay/tests. run_tests.sh runs run_tests.py with both python2 and python3 as interpreter. --- run_tests.py | 10 ++++++++++ run_tests.sh | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/run_tests.py b/run_tests.py new file mode 100755 index 0000000..b3156f1 --- /dev/null +++ b/run_tests.py @@ -0,0 +1,10 @@ +#!/usr/bin/python + +import unittest + +import tests.depres + + +if __name__ == '__main__': + tests = tests.depres.suite() + unittest.TextTestRunner ( verbosity=2 ).run ( tests ) diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 0000000..48ed757 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,21 @@ +#!/bin/sh +cd "${0%/*}" || exit + +TESTPY="${PWD}/run_tests.py" +first=Y + +conf="${PWD}/R-overlay.conf" +tconf="${conf}.tests" + +[ -e "${tconf}" ] || { ln -vs -- "${conf}" "${tconf}" && first=; } || exit + +for PYTHON in python2 python3; do + if which ${PYTHON} 1>/dev/null 2>/dev/null; then + [ -n "${first}" ] && first= || echo + echo "*** Running ${TESTPY##*/} with PYTHON=${PYTHON} ***" + echo + PYTHONPATH="${PWD}" ${PYTHON} "${TESTPY}" + else + echo "PYTHON=${PYTHON} not found." 1>&2 + fi +done