summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-07-05 12:18:50 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-07-06 11:44:45 -0400
commitf4e497df7dab24d2a6f256559433d2eebbe5e46c (patch)
tree42ef674ff598a9e560e753b0f0b7f92773001f09 /src
parent34c222586c1ee4790ce3ff86a2ffb27c666c0662 (diff)
downloadsssd-f4e497df7dab24d2a6f256559433d2eebbe5e46c.tar.gz
sssd-f4e497df7dab24d2a6f256559433d2eebbe5e46c.tar.bz2
sssd-f4e497df7dab24d2a6f256559433d2eebbe5e46c.zip
Fix SSSDConfigTest for separate build directories
Diffstat (limited to 'src')
-rwxr-xr-xsrc/config/SSSDConfigTest.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py
index c5bc8bc7..f4d4d541 100755
--- a/src/config/SSSDConfigTest.py
+++ b/src/config/SSSDConfigTest.py
@@ -8,8 +8,17 @@ import unittest
import os
from stat import *
+import sys
+
+srcdir = os.getenv('srcdir')
+if srcdir:
+ sys.path.append("./src/config")
+ srcdir = srcdir + "/src/config"
+else:
+ srcdir = "."
import SSSDConfig
+
class SSSDConfigTestValid(unittest.TestCase):
def setUp(self):
pass
@@ -1780,14 +1789,6 @@ class SSSDConfigTestSSSDConfig(unittest.TestCase):
if __name__ == "__main__":
error = 0
- import os
- import sys
- srcdir = os.getenv('srcdir')
- if srcdir:
- srcdir = srcdir + "/src/config"
- else:
- srcdir = "."
-
suite = unittest.TestLoader().loadTestsFromTestCase(SSSDConfigTestSSSDService)
res = unittest.TextTestRunner().run(suite)
if not res.wasSuccessful():