From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SHKDC-0002mj-8D for garchives@archives.gentoo.org; Mon, 09 Apr 2012 19:25:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 018EFE0B38; Mon, 9 Apr 2012 19:25:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C88CBE0B38 for ; Mon, 9 Apr 2012 19:25:04 +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 CEEE81B4010 for ; Mon, 9 Apr 2012 19:25:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 97602E5402 for ; Mon, 9 Apr 2012 19:25:02 +0000 (UTC) From: "Andrea Arteaga" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrea Arteaga" Message-ID: <1333999348.c714fb08fdb4ec06d573bc9aa8647fa62fc182f1.spiros@gentoo> Subject: [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/ X-VCS-Repository: proj/auto-numerical-bench X-VCS-Files: numbench/benchconfig.py numbench/main.py X-VCS-Directories: numbench/ X-VCS-Committer: spiros X-VCS-Committer-Name: Andrea Arteaga X-VCS-Revision: c714fb08fdb4ec06d573bc9aa8647fa62fc182f1 X-VCS-Branch: master Date: Mon, 9 Apr 2012 19:25:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4d9d20e6-d58b-403d-b2fe-cf7024ace35b X-Archives-Hash: e3e0ae86ca77a90da96badc390820c3a commit: c714fb08fdb4ec06d573bc9aa8647fa62fc182f1 Author: Andrea Arteaga gmail com> AuthorDate: Mon Apr 9 19:22:28 2012 +0000 Commit: Andrea Arteaga gmail com> CommitDate: Mon Apr 9 19:22:28 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/auto-numerica= l-bench.git;a=3Dcommit;h=3Dc714fb08 Added -c / --clean switch. --- numbench/benchconfig.py | 10 +++++++++- numbench/main.py | 4 ++++ 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/numbench/benchconfig.py b/numbench/benchconfig.py index c7ff33b..244ac63 100644 --- a/numbench/benchconfig.py +++ b/numbench/benchconfig.py @@ -50,11 +50,19 @@ if not locals().has_key('initialized'): basedir =3D pjoin(curdir, passargs[i+1]) passargs =3D passargs[:i] + passargs[i+2:] break + =20 + if a in ('-c', '--clean'): + clean =3D True + passargs =3D passargs[:i] + passargs[i+1:] + =20 + # Clean flag + if not locals().has_key('clean'): + clean =3D False =20 # Storage directories if not locals().has_key('basedir'): basedirb =3D pjoin(os.environ['HOME'], '.numbench') \ - + '/run_' + modulename + '_' + time.strftime('%Y-%m-%d') + + '/numbench_' + modulename + '_' + time.strftime('%Y-%m= -%d') if os.path.exists(basedirb): n =3D 1 while True: diff --git a/numbench/main.py b/numbench/main.py index 6e9fb2c..acfe6d7 100644 --- a/numbench/main.py +++ b/numbench/main.py @@ -238,6 +238,10 @@ for tn,(name,test) in enumerate(cfg.tests.items(),1)= : # Save the results report.saveReport() =20 +# Clean up the directories +if cfg.clean: + bu.rmdir(cfg.testsdir) + bu.rmdir(cfg.rootsdir) =20 =20 # TODO: reintroduce the instructions feature (and remove "exit)