Permalink
Browse files

improved runtests.sh and gitignore

  • Loading branch information...
1 parent a610a68 commit 3da6e83cb500ae3c7b81c9137f2ec905ec296841 Jonas Obrist committed Jul 16, 2010
View
@@ -6,11 +6,14 @@ cms/django
*.DS_Store
*.svn
.*
+*.xml
+cms.sqlite
cms/media/cms_page_media/
cms/docs/build
example/run
example/local_settings.py
reversion/
+htmlcov
build
dist
.ropeproject
View
@@ -1,25 +1,16 @@
#!/bin/bash
cd tests
-if [ "`python -c 'import django; print django.get_version()' 2>/dev/null`" == "1.2.1" ]
- then
- cd testapp
- if which coverage &> /dev/null; then
- coverage run manage.py test cms
- retcode=$?
- coverage xml --omit=parts,/usr/,eggs
- mv *.xml ..
- else
- python manage.py test cms
- retcode=$?
- fi
- cd ..
- else
- echo "setting up test environment (this might take a while)..."
- python bootstrap.py >/dev/null 2>&1
- ./bin/buildout >/dev/null 2>&1
- ./bin/coverage run ./testapp/manage.py test cms
- retcode=$?
- ./bin/coverage xml --omit=parts,/usr/,eggs
+echo "setting up test environment (this might take a while)..."
+python bootstrap.py >/dev/null 2>&1
+./bin/buildout >/dev/null 2>&1
+if [ $1 ]; then
+ suite="cms.$1"
+else
+ suite='cms'
fi
+./bin/coverage run ./testapp/manage.py test $suite
+retcode=$?
+./bin/coverage xml --omit=parts,/usr/,eggs
+./bin/coverage html --omit=parts,/usr/,eggs
cd ..
-exit $retcode
+exit $retcode
@@ -1,29 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="cms.tests.menu.MenusTestCase" tests="18" time="0.009">
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_01_basic_cms_menu" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_02_show_menu" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_03_only_active_tree" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_04_only_one_active_level" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_05_only_level_zero" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_06_only_level_one" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_07_only_level_one_active" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_08_level_zero_and_one" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_09_show_submenu" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_10_show_breadcrumb" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_11_language_chooser" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_12_page_language_url" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_13_show_menu_below_id" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_14_unpublished" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_15_empty_menu" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_15_home_not_in_menu" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_16_softroot" time="0.001"/>
- <testcase classname="cms.tests.menu.MenusTestCase" name="test_17_show_submenu_from_non_menu_page" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,16 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="cms.tests.navextender.NavExtenderTestCase" tests="5" time="0.003">
- <testcase classname="cms.tests.navextender.NavExtenderTestCase" name="test_01_menu_registration" time="0.001"/>
- <testcase classname="cms.tests.navextender.NavExtenderTestCase" name="test_02_extenders_on_root" time="0.001"/>
- <testcase classname="cms.tests.navextender.NavExtenderTestCase" name="test_03_extenders_on_root_child" time="0.001"/>
- <testcase classname="cms.tests.navextender.NavExtenderTestCase" name="test_04_extenders_on_child" time="0.001"/>
- <testcase classname="cms.tests.navextender.NavExtenderTestCase" name="test_05_incorrect_nav_extender_in_db" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,21 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="cms.tests.page.PagesTestCase" tests="10" time="0.005">
- <testcase classname="cms.tests.page.PagesTestCase" name="test_01_add_page" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_02_create_page" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_03_slug_collision" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_04_details_view" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_05_edit_page" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_06_meta_description_and_keywords_fields_from_admin" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_07_meta_description_and_keywords_from_template_tags" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_08_copy_page" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_09_language_change" time="0.001"/>
- <testcase classname="cms.tests.page.PagesTestCase" name="test_10_move_page" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,36 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="1" name="cms.tests.permmod.PermissionModeratorTestCase" tests="18" time="0.009">
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_00_test_configuration" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_01_super_can_add_page_to_root" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_02_master_can_add_page_to_root" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_03_slave_can_add_page_to_root" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_04_moderation_on_slave_home" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_05_slave_can_add_page_under_slave_home" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_06_super_can_add_plugin" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_07_master_can_add_plugin" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_08_slave_can_add_plugin" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_09_same_order" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_10_create_copy_publish" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_11_create_publish_copy" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_12_subtree_needs_approvement" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_13_subtree_with_super" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_14_super_add_page_to_root" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_15_moderator_flags" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_16_patricks_move" time="0.001"/>
- <testcase classname="cms.tests.permmod.PermissionModeratorTestCase" name="test_17_plugins_get_published" time="0.001">
- <failure message="1 != 2" type="AssertionError">
-<![CDATA[Traceback (most recent call last):
- File "/home/jonas/workspace/django-cms/cms/tests/permmod.py", line 665, in test_17_plugins_get_published
- self.assertEqual(CMSPlugin.objects.all().count(), 2)
-AssertionError: 1 != 2
-]]> </failure>
- </testcase>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,19 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="cms.tests.placeholder.PlaceholderTestCase" tests="8" time="0.004">
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_01_placeholder_scanning_extend" time="0.001"/>
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_02_placeholder_scanning_include" time="0.001"/>
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_03_placeholder_scanning_double_extend" time="0.001"/>
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_04_placeholder_scanning_complex" time="0.001"/>
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_05_placeholder_scanning_super" time="0.001"/>
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_06_placeholder_scanning_nested" time="0.001"/>
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_07_placeholder_scanning_duplicate" time="0.001"/>
- <testcase classname="cms.tests.placeholder.PlaceholderTestCase" name="test_08_placeholder_scanning_extend_outside_block" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,13 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="cms.tests.plugins.PluginsTestCase" tests="2" time="0.001">
- <testcase classname="cms.tests.plugins.PluginsTestCase" name="test_01_add_edit_plugin" time="0.001"/>
- <testcase classname="cms.tests.plugins.PluginsTestCase" name="test_02_copy_plugins" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,21 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="cms.tests.rendering.RenderingTestCase" tests="10" time="0.005">
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_00_details_view" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_01_processors" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_02_placeholder" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_03_placeholderor" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_04_show_placeholder" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_05_show_uncached_placeholder" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_06_page_url" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_07_page_attribute" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_08_mail_managers" time="0.001"/>
- <testcase classname="cms.tests.rendering.RenderingTestCase" name="test_09_inherit_placeholder" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,12 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="cms.tests.site.SiteTestCase" tests="1" time="0.001">
- <testcase classname="cms.tests.site.SiteTestCase" name="test_01_site_framework" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
@@ -1,13 +0,0 @@
-<?xml version="1.0" ?>
-<testsuite errors="0" failures="0" name="doctest.DocTestCase" tests="2" time="0.001">
- <testcase classname="doctest.DocTestCase" name="runTest" time="0.001"/>
- <testcase classname="doctest.DocTestCase" name="runTest" time="0.001"/>
- <system-out>
-<![CDATA[]]> </system-out>
- <system-err>
-<![CDATA[/home/jonas/workspace/django-cms/cms/models/pluginmodel.py:176: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them!
- DontUsePageAttributeWarning)
-/home/jonas/workspace/_shared_eggs/unittest_xml_reporting-1.0.3-py2.6.egg/xmlrunner/__init__.py:220: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
- failure.setAttribute('message', test_result.err[1].message)
-]]> </system-err>
-</testsuite>
Oops, something went wrong. Retry.

0 comments on commit 3da6e83

Please sign in to comment.