Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 12028D4F2 for ; Tue, 18 Sep 2012 07:27:40 +0000 (UTC) Received: (qmail 99612 invoked by uid 500); 18 Sep 2012 07:27:40 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 99437 invoked by uid 500); 18 Sep 2012 07:27:35 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 99401 invoked by uid 99); 18 Sep 2012 07:27:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 07:27:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Tue, 18 Sep 2012 07:27:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E6B7523889D7; Tue, 18 Sep 2012 07:26:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1387018 - /incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/Run.java Date: Tue, 18 Sep 2012 07:26:46 -0000 To: ooo-commits@incubator.apache.org From: liuzhe@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120918072646.E6B7523889D7@eris.apache.org> Author: liuzhe Date: Tue Sep 18 07:26:46 2012 New Revision: 1387018 URL: http://svn.apache.org/viewvc?rev=1387018&view=rev Log: add -propertyfile argument Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/Run.java Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/Run.java URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/Run.java?rev=1387018&r1=1387017&r2=1387018&view=diff ============================================================================== --- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/Run.java (original) +++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/Run.java Tue Sep 18 07:26:46 2012 @@ -22,11 +22,13 @@ package org.openoffice.test; import java.util.ArrayList; import java.util.List; +import java.util.Properties; import java.util.logging.Level; import org.junit.runner.JUnitCore; import org.junit.runner.Result; import org.junit.runner.notification.RunListener; +import org.openoffice.test.common.FileUtil; import org.openoffice.test.common.Logger; import org.openoffice.test.common.NamedRequest; @@ -48,6 +50,7 @@ public class Run { System.out.println(msg); System.out.println("Usage: [options]"); System.out.println(" -D= Set system property"); + System.out.println(" -propertyfile file Set system property from property file"); System.out.println(" -r Set a runnable which will be executed before all tests start."); System.out.println(" -l Set a test listeners."); System.out.println(" -tp Define a test suite with test packages separated by comma. Format: [name]:org.package1,org.package2..."); @@ -83,6 +86,11 @@ public class Run { value = propEntry.substring(++in); } System.setProperty(key, value); + } else if (arg.equals("-propertyfile")) { + if (++i >= args.length) + printUsage("Invalid arguments", 1); + Properties props = FileUtil.loadProperties(args[i]); + System.setProperties(props); } else if (arg.equals("-r")) { if (++i >= args.length) printUsage("Invalid arguments", 1);