Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 70325 invoked from network); 21 Jul 2010 12:18:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Jul 2010 12:18:12 -0000 Received: (qmail 97277 invoked by uid 500); 21 Jul 2010 12:18:12 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 97180 invoked by uid 500); 21 Jul 2010 12:18:10 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 97173 invoked by uid 99); 21 Jul 2010 12:18:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 12:18:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 12:18:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6EC0323889B9; Wed, 21 Jul 2010 12:17:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r966204 - /subversion/trunk/win-tests.py Date: Wed, 21 Jul 2010 12:17:13 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100721121713.6EC0323889B9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhuijben Date: Wed Jul 21 12:17:13 2010 New Revision: 966204 URL: http://svn.apache.org/viewvc?rev=966204&view=rev Log: Allow using win-tests.py's test setup framework to run the javahl tests. The reason to use the same script on Windows is that the test framework already moves all required DLLs in place to run the tests and knows where to find junit and other required components. (Which is handled by the make scripts on the posix systems) * win-tests.py (imports): Import subprocess. (_usage_exit): Document --javahl option (global): Parse --javahl to test_javahl. Run javahl tests instead of normal tests if --javahl is passed. Modified: subversion/trunk/win-tests.py Modified: subversion/trunk/win-tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/win-tests.py?rev=966204&r1=966203&r2=966204&view=diff ============================================================================== --- subversion/trunk/win-tests.py (original) +++ subversion/trunk/win-tests.py Wed Jul 21 12:17:13 2010 @@ -27,7 +27,7 @@ For a list of options, run this script w # $HeadURL$ # $LastChangedRevision$ -import os, sys +import os, sys, subprocess import filecmp import shutil import traceback @@ -76,6 +76,7 @@ def _usage_exit(): print(" --httpd-daemon : Run Apache httpd as daemon") print(" --httpd-service : Run Apache httpd as Windows service (default)") print(" --http-library : dav library to use, neon (default) or serf") + print(" --javahl : Run the javahl tests instead of the normal tests") print(" --list : print test doc strings only") print(" --enable-sasl : enable Cyrus SASL authentication for") print(" svnserve") @@ -115,7 +116,7 @@ opts, args = my_getopt(sys.argv[1:], 'hr 'url=', 'svnserve-args=', 'fs-type=', 'asp.net-hack', 'httpd-dir=', 'httpd-port=', 'httpd-daemon', 'httpd-server', 'http-library=', 'help', - 'fsfs-packing', 'fsfs-sharding=', + 'fsfs-packing', 'fsfs-sharding=', 'javahl', 'list', 'enable-sasl', 'bin=', 'parallel', 'config-file=', 'server-minor-version=']) if len(args) > 1: @@ -134,6 +135,7 @@ httpd_port = None httpd_service = None http_library = 'neon' list_tests = None +test_javahl = None enable_sasl = None svn_bin = None parallel = None @@ -180,6 +182,8 @@ for opt, val in opts: fsfs_sharding = int(val) elif opt == '--fsfs-packing': fsfs_packing = 1 + elif opt == '--javahl': + test_javahl = 1 elif opt == '--list': list_tests = 1 elif opt == '--enable-sasl': @@ -642,25 +646,61 @@ else: print('Testing %s configuration on %s' % (objdir, repo_loc)) sys.path.insert(0, os.path.join(abs_srcdir, 'build')) -import run_tests -th = run_tests.TestHarness(abs_srcdir, abs_builddir, - os.path.join(abs_builddir, log), - os.path.join(abs_builddir, faillog), - base_url, fs_type, http_library, - server_minor_version, 1, cleanup, - enable_sasl, parallel, config_file, - fsfs_sharding, fsfs_packing, - list_tests, svn_bin) -old_cwd = os.getcwd() -try: - os.chdir(abs_builddir) - failed = th.run(tests_to_run) -except: - os.chdir(old_cwd) - raise -else: - os.chdir(old_cwd) +if not test_javahl: + import run_tests + th = run_tests.TestHarness(abs_srcdir, abs_builddir, + os.path.join(abs_builddir, log), + os.path.join(abs_builddir, faillog), + base_url, fs_type, http_library, + server_minor_version, 1, cleanup, + enable_sasl, parallel, config_file, + fsfs_sharding, fsfs_packing, + list_tests, svn_bin) + old_cwd = os.getcwd() + try: + os.chdir(abs_builddir) + failed = th.run(tests_to_run) + except: + os.chdir(old_cwd) + raise + else: + os.chdir(old_cwd) +else: + failed = False + args = ( + 'java.exe', + '-Dtest.rootdir=' + os.path.join(abs_builddir, 'javahl'), + '-Dtest.srcdir=' + os.path.join(abs_srcdir, + 'subversion/bindings/javahl'), + '-Dtest.rooturl=', + '-Dtest.fstype=' + fs_type , + '-Dtest.tests=', + + '-Djava.library.path=' + + os.path.join(abs_objdir, + 'subversion/bindings/javahl/native'), + '-classpath', + os.path.join(abs_srcdir, 'subversion/bindings/javahl/classes') +';' + + gen_obj.junit_path + ) + + sys.stderr.flush() + print('Running org.apache.subversion tests:') + sys.stdout.flush() + + r = subprocess.call(args + tuple(['org.apache.subversion.javahl.RunTests'])) + sys.stdout.flush() + if (r != 0): + failed = True + + print('Running org.tigris.subversion tests:') + sys.stdout.flush() + r = subprocess.call(args + tuple(['org.tigris.subversion.javahl.RunTests'])) + sys.stdout.flush() + if (r != 0): + failed = True + # Stop service daemon, if any if daemon: del daemon