From 09671eb6fc22ae70d50c364d8e0061509e6360fa Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 16 Jan 2010 23:33:26 +0100 Subject: [PATCH] rename logxml plugin to junitxml --HG-- branch : trunk --- CHANGELOG | 4 ++-- bin-for-dist/makepluginlist.py | 2 +- doc/test/plugin/index.txt | 2 +- doc/test/plugin/{logxml.txt => junitxml.txt} | 8 ++++---- doc/test/plugin/links.txt | 6 +++--- doc/test/plugin/xdist.txt | 4 ++-- py/_plugin/{pytest_logxml.py => pytest_junitxml.py} | 4 ++-- py/_test/pluginmanager.py | 2 +- .../{test_pytest_logxml.py => test_pytest_junitxml.py} | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) rename doc/test/plugin/{logxml.txt => junitxml.txt} (71%) rename py/_plugin/{pytest_logxml.py => pytest_junitxml.py} (97%) rename testing/plugin/{test_pytest_logxml.py => test_pytest_junitxml.py} (98%) diff --git a/CHANGELOG b/CHANGELOG index 4fd28f264..6633f05de 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,8 +4,8 @@ Changes between 1.X and 1.1.1 - moved dist/looponfailing from py.test core into a new separately released pytest-xdist plugin. -- new junitxml plugin: --xml=path will generate a junit style xml file - which is parseable e.g. by the hudson continous integration server. +- new junitxml plugin: --junitxml=path will generate a junit style xml file + which is processable e.g. by the Hudson CI system. - new option: --genscript=path will generate a standalone py.test script which will not need any libraries installed. thanks to Ralf Schmitt. diff --git a/bin-for-dist/makepluginlist.py b/bin-for-dist/makepluginlist.py index 3238c957e..bc1055dd8 100644 --- a/bin-for-dist/makepluginlist.py +++ b/bin-for-dist/makepluginlist.py @@ -9,7 +9,7 @@ plugins = [ ('other testing domains, misc', 'oejskit django xdist genscript'), ('reporting and failure logging', - 'pastebin logxml xmlresult resultlog terminal',), + 'pastebin junitxml xmlresult resultlog terminal',), ('other testing conventions', 'unittest nose doctest restdoc'), ('core debugging / help functionality', diff --git a/doc/test/plugin/index.txt b/doc/test/plugin/index.txt index 26bfe9fbb..7da09814d 100644 --- a/doc/test/plugin/index.txt +++ b/doc/test/plugin/index.txt @@ -38,7 +38,7 @@ reporting and failure logging pastebin_ submit failure or test session information to a pastebin service. -logxml_ logging of test results in JUnit-XML format, for use with Hudson +junitxml_ logging of test results in JUnit-XML format, for use with Hudson xmlresult_ (external) for generating xml reports and CruiseControl integration diff --git a/doc/test/plugin/logxml.txt b/doc/test/plugin/junitxml.txt similarity index 71% rename from doc/test/plugin/logxml.txt rename to doc/test/plugin/junitxml.txt index b9060b12e..6bc428e80 100644 --- a/doc/test/plugin/logxml.txt +++ b/doc/test/plugin/junitxml.txt @@ -12,15 +12,15 @@ command line options -------------------- -``--xml=path`` - create junit-xml style report file at the given path. +``--junitxml=path`` + create junit-xml style report file at given path. Start improving this plugin in 30 seconds ========================================= -1. Download `pytest_logxml.py`_ plugin source code -2. put it somewhere as ``pytest_logxml.py`` into your import path +1. Download `pytest_junitxml.py`_ plugin source code +2. put it somewhere as ``pytest_junitxml.py`` into your import path 3. a subsequent ``py.test`` run will use your local version Checkout customize_, other plugins_ or `get in contact`_. diff --git a/doc/test/plugin/links.txt b/doc/test/plugin/links.txt index 661615d1b..a96030a96 100644 --- a/doc/test/plugin/links.txt +++ b/doc/test/plugin/links.txt @@ -1,4 +1,4 @@ -.. _`pytest_logxml.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_logxml.py +.. _`helpconfig`: helpconfig.html .. _`terminal`: terminal.html .. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_recwarn.py .. _`unittest`: unittest.html @@ -20,8 +20,7 @@ .. _`pytest_tmpdir.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_tmpdir.py .. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_figleaf.py .. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_hooklog.py -.. _`logxml`: logxml.html -.. _`helpconfig`: helpconfig.html +.. _`junitxml`: junitxml.html .. _`plugin.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/plugin.py .. _`pytest_skipping.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_skipping.py .. _`checkout the py.test development version`: ../../install.html#checkout @@ -40,6 +39,7 @@ .. _`monkeypatch`: monkeypatch.html .. _`coverage`: coverage.html .. _`resultlog`: resultlog.html +.. _`pytest_junitxml.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_junitxml.py .. _`django`: django.html .. _`xmlresult`: xmlresult.html .. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_unittest.py diff --git a/doc/test/plugin/xdist.txt b/doc/test/plugin/xdist.txt index 0c23b1907..a711ca86b 100644 --- a/doc/test/plugin/xdist.txt +++ b/doc/test/plugin/xdist.txt @@ -9,8 +9,8 @@ loop on failing tests, distribute test runs to CPUs and hosts. The `pytest-xdist`_ plugin extends py.test with some unique test execution modes: -* Looponfail: run your tests in a subprocess. After it finishes py.test - waits until a file in your project changes and then re-runs only the +* Looponfail: run your tests repeatedly in a subprocess. After each run py.test + waits until a file in your project changes and then re-runs the previously failing tests. This is repeated until all tests pass after which again a full run is performed. diff --git a/py/_plugin/pytest_logxml.py b/py/_plugin/pytest_junitxml.py similarity index 97% rename from py/_plugin/pytest_logxml.py rename to py/_plugin/pytest_junitxml.py index 68b3f740e..cdad69881 100644 --- a/py/_plugin/pytest_logxml.py +++ b/py/_plugin/pytest_junitxml.py @@ -8,9 +8,9 @@ import time def pytest_addoption(parser): group = parser.getgroup("terminal reporting") - group.addoption('--xml', action="store", dest="xmlpath", + group.addoption('--junitxml', action="store", dest="xmlpath", metavar="path", default=None, - help="create junit-xml style report file at the given path.") + help="create junit-xml style report file at given path.") def pytest_configure(config): xmlpath = config.option.xmlpath diff --git a/py/_test/pluginmanager.py b/py/_test/pluginmanager.py index d66b567ac..7428265ca 100644 --- a/py/_test/pluginmanager.py +++ b/py/_test/pluginmanager.py @@ -9,7 +9,7 @@ from py._test.outcome import Skipped default_plugins = ( "default runner capture terminal mark skipping tmpdir monkeypatch " "recwarn pdb pastebin unittest helpconfig nose assertion genscript " - "logxml doctest").split() + "junitxml doctest").split() def check_old_use(mod, modname): clsname = modname[len('pytest_'):].capitalize() + "Plugin" diff --git a/testing/plugin/test_pytest_logxml.py b/testing/plugin/test_pytest_junitxml.py similarity index 98% rename from testing/plugin/test_pytest_logxml.py rename to testing/plugin/test_pytest_junitxml.py index 11ae74815..65597c535 100644 --- a/testing/plugin/test_pytest_logxml.py +++ b/testing/plugin/test_pytest_junitxml.py @@ -3,7 +3,7 @@ from xml.dom import minidom def runandparse(testdir, *args): resultpath = testdir.tmpdir.join("junit.xml") - result = testdir.runpytest("--xml=%s" % resultpath, *args) + result = testdir.runpytest("--junitxml=%s" % resultpath, *args) xmldoc = minidom.parse(str(resultpath)) return result, xmldoc