aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-horizon/horizon-use-full-package-path-to-test-directories.patch
blob: ea29a16fee69457a5baf14160ec7bf8b2187a9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 16f66dec1dc9e7c98cc5d6d0099a7865bf5b8e71 Mon Sep 17 00:00:00 2001
From: Keith Holman <Keith.Holman@windriver.com>
Date: Fri, 30 May 2014 11:58:33 -0400
Subject: [PATCH] horizon: use full package path to test directories

The tests included Horizon expect all files to be in a single
location in order to be run directly from the source tree. The
recipe for installing Horizon on the system installs Horizon
as a python site-package and puts files in different locations
depending on the file type.  In order to have the tests support
this type of install we need to explicitly indicate the full path
of the test files to exclude in order to have the tests run
successfully.  This fix adds an identifier that will be replaced
within the build recipe with the full path to the python site
packages.

Signed-off-by: Keith Holman <Keith.Holman@windriver.com>

---
 horizon/test/settings.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/horizon/test/settings.py b/horizon/test/settings.py
index fde7c12..3df65af 100644
--- a/horizon/test/settings.py
+++ b/horizon/test/settings.py
@@ -109,8 +109,8 @@ SITE_BRANDING = 'Horizon'
 TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
 NOSE_ARGS = ['--nocapture',
              '--nologcapture',
-             '--exclude-dir=horizon/conf/',
-             '--exclude-dir=horizon/test/customization',
+             '--exclude-dir=%PYTHON_SITEPACKAGES%/horizon/conf/',
+             '--exclude-dir=%PYTHON_SITEPACKAGES%/horizon/test/customization',
              '--cover-package=horizon',
              '--cover-inclusive',
              '--all-modules']