From ec3e05cde64d2f422950f1e7e6ee69114a5feaec Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 31 May 2007 19:48:51 +0000 Subject: [PATCH] Adding some helper scripts and files for buildbot testing. - Legacy-Id: 191 --- test/lib/README | 9 +++++++++ test/patch-django | 17 +++++++++++++++++ test/r5106.patch | 21 +++++++++++++++++++++ test/settings_local_develop.py | 0 test/settings_local_development.py | 0 test/settings_local_test.py | 0 test/test-setup | 0 7 files changed, 47 insertions(+) create mode 100644 test/lib/README create mode 100644 test/patch-django create mode 100644 test/r5106.patch create mode 100644 test/settings_local_develop.py create mode 100644 test/settings_local_development.py create mode 100644 test/settings_local_test.py create mode 100644 test/test-setup diff --git a/test/lib/README b/test/lib/README new file mode 100644 index 000000000..2dda507f0 --- /dev/null +++ b/test/lib/README @@ -0,0 +1,9 @@ +This directory will be used to set up packages used for testing if they need any +special handling which should not be applied to the system-wide setup. + +For instance, many of the tests to be run on the Django application should be run +with a standard Django environment; but there are some Django test features which +are broken in 0.9.6, and need patching in order to do the testing, like the ability +to create a test database to run unit tests, according to this issue and patch: +http://code.djangoproject.com/changeset/5106 + diff --git a/test/patch-django b/test/patch-django new file mode 100644 index 000000000..8fc94cc31 --- /dev/null +++ b/test/patch-django @@ -0,0 +1,17 @@ +#!/bin/bash +# +# This script expects to be started by a Buildbot slave with PWD set to the build +# directory. Assuming we check out trunk or branch-XXX with the command +# 'svn co URL/BRANCH/' +# then this script will at $PWD/test/patch-django and we will place our patched +# django in $PWD/test/lib/django +# + +build=$PWD +django=$(python -c "import django; print django.__path__[0]") + +rsync -Cav $django $build/test/lib/ +cd $build/test/lib/ +patch -p 2 < $build/test/r5105.patch + +exit 0 diff --git a/test/r5106.patch b/test/r5106.patch new file mode 100644 index 000000000..7168474e6 --- /dev/null +++ b/test/r5106.patch @@ -0,0 +1,21 @@ +Index: /django/trunk/django/core/management.py +=================================================================== +--- /django/trunk/django/core/management.py (revision 5102) ++++ /django/trunk/django/core/management.py (revision 5106) +@@ -169,4 +169,6 @@ + if isinstance(f, (models.ForeignKey, models.OneToOneField)): + rel_field = f.rel.get_related_field() ++ while isinstance(rel_field, (models.ForeignKey, models.OneToOneField)): ++ rel_field = rel_field.rel.get_related_field() + data_type = get_rel_data_type(rel_field) + else: +Index: /django/trunk/AUTHORS +=================================================================== +--- /django/trunk/AUTHORS (revision 5102) ++++ /django/trunk/AUTHORS (revision 5106) +@@ -165,4 +165,5 @@ + Robert Myers + Nebojša Dorđević ++ Gopal Narayanan + Fraser Nevett + Sam Newman diff --git a/test/settings_local_develop.py b/test/settings_local_develop.py new file mode 100644 index 000000000..e69de29bb diff --git a/test/settings_local_development.py b/test/settings_local_development.py new file mode 100644 index 000000000..e69de29bb diff --git a/test/settings_local_test.py b/test/settings_local_test.py new file mode 100644 index 000000000..e69de29bb diff --git a/test/test-setup b/test/test-setup new file mode 100644 index 000000000..e69de29bb