summaryrefslogtreecommitdiffstats
path: root/ipatests/ipa-run-tests
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-05-23 14:59:09 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-07-15 15:49:04 +0200
commit226f9d681df92ea2757c3f97386859983474f727 (patch)
tree53fe6a38c02f71b3d2e33e5333ad632ab7bf2af7 /ipatests/ipa-run-tests
parent5db5d168d9ce4a0151328fbdeb63cac7516f60f4 (diff)
downloadfreeipa-226f9d681df92ea2757c3f97386859983474f727.tar.gz
freeipa-226f9d681df92ea2757c3f97386859983474f727.tar.xz
freeipa-226f9d681df92ea2757c3f97386859983474f727.zip
Add a plugin for test ordering
Tests in test classes decorated by @ipatests.order_plugin.ordered are sorted by the source line number instead of alphabetically, if the plugin is enabled. The ipa-run-tests helper now loads and enables the plugin. This should make writing integration tests easier.
Diffstat (limited to 'ipatests/ipa-run-tests')
-rwxr-xr-xipatests/ipa-run-tests4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipatests/ipa-run-tests b/ipatests/ipa-run-tests
index e788df30b..fe2cca6f4 100755
--- a/ipatests/ipa-run-tests
+++ b/ipatests/ipa-run-tests
@@ -34,12 +34,14 @@ import nose
import ipatests
from ipatests.beakerlib_plugin import BeakerLibPlugin
+from ipatests.order_plugin import OrderTests
cmd = [
sys.argv[0],
'-v',
'--with-doctest',
'--doctest-tests',
+ '--with-ordered-tests',
'--exclude=plugins',
'--where', os.path.dirname(ipatests.__file__),
]
@@ -49,4 +51,4 @@ cmd += sys.argv[1:]
# This must be set so ipalib.api gets initialized property for tests:
os.environ['IPA_UNIT_TEST_MODE'] = 'cli_test'
-nose.main(argv=cmd, addplugins=[BeakerLibPlugin()])
+nose.main(argv=cmd, addplugins=[BeakerLibPlugin(), OrderTests()])