Changeset 146868 in webkit


Ignore:
Timestamp:
Mar 26, 2013 4:49:31 AM (11 years ago)
Author:
Csaba Osztrogonác
Message:

[Qt] Enable release/debug/2/webkit2 options for run-qtwebkit-tests
https://bugs.webkit.org/show_bug.cgi?id=113287

Reviewed by Jocelyn Turcotte.

  • Scripts/run-qtwebkit-tests:

(Options.init):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r146864 r146868  
     12013-03-26  Csaba Osztrogonác  <ossy@webkit.org>
     2
     3        [Qt] Enable release/debug/2/webkit2 options for run-qtwebkit-tests
     4        https://bugs.webkit.org/show_bug.cgi?id=113287
     5
     6        Reviewed by Jocelyn Turcotte.
     7
     8        * Scripts/run-qtwebkit-tests:
     9        (Options.__init__):
     10
    1112013-03-26  Rijubrata Bhaumik  <rijubrata.bhaumik@intel.com>
    212
  • trunk/Tools/Scripts/run-qtwebkit-tests

    r119588 r146868  
    4545        Log.__init__(self, "Options")
    4646        log = self._log
    47         opt = OptionParser("%prog [options] PathToSearch.\nTry -h or --help.")
     47        opt = OptionParser("%prog [options] [PathToSearch].\nTry -h or --help.")
    4848        opt.add_option("-j", "--parallel-level", action="store", type="int",
    4949              dest="parallel_level", default=None,
     
    7070              dest="timeout", default=0,
    7171              help="Timeout in seconds for each testsuite. Zero value means that there is not timeout. Default: %default.")
     72        opt.add_option("--release", action="store_true", dest="release", default=True,
     73              help="Run API tests in WebKitBuild/Release/... directory. It is ignored if PathToSearch is passed.")
     74        opt.add_option("--debug", action="store_false", dest="release",
     75              help="Run API tests in WebKitBuild/Debug/... directory. It is ignored if PathToSearch is passed.")
     76        opt.add_option("-2", "--webkit2", action="store_true", dest="webkit2", default=False,
     77              help="Run WebKit2 API tests. Default: Run WebKit1 API tests. It is ignored if PathToSearch is passed.")
    7278
    7379        self._o, self._a = opt.parse_args(args)
     
    8490            logging.basicConfig(level=logging.INFO,)
    8591            log.warn("Bad verbose level, switching to default.")
     92
     93        if self._o.release:
     94            configuration = "Release"
     95        else:
     96            configuration = "Debug"
     97
     98        if self._o.webkit2:
     99            test_directory = "WebKit2/UIProcess/API/qt/tests/"
     100        else:
     101            test_directory = "WebKit/qt/tests/"
     102
    86103        try:
    87             if not os.path.exists(self._a[0]):
     104            if len(self._a) == 0:
     105                self._o.path = "WebKitBuild/%s/Source/%s" % (configuration, test_directory)
     106            else:
     107                if len(self._a) > 1:
     108                    raise IndexError("Only one directory should be provided.")
     109                self._o.path = self._a[0]
     110
     111            if not os.path.exists(self._o.path):
    88112                raise Exception("Given path doesn't exist.")
    89             if len(self._a) > 1:
    90                 raise IndexError("Only one directory could be provided.")
    91             self._o.path = self._a[0]
    92113        except IndexError:
    93114            log.error("Bad usage. Please try -h or --help.")
    94115            sys.exit(1)
    95116        except Exception:
    96             log.error("Path '%s' doesn't exist", self._a[0])
     117            log.error("Path '%s' doesn't exist", self._o.path)
    97118            sys.exit(2)
     119
    98120        if self._o.developer:
    99121            if not self._o.parallel_level is None:
Note: See TracChangeset for help on using the changeset viewer.