Implement urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
[cascardo/ipsilon.git] / quickrun.py
index ac22f6b..57cdcb7 100755 (executable)
@@ -80,7 +80,8 @@ def config(workdir):
                          'sesstype': 'file',
                          'sessopt': 'path',
                          'sessval': os.path.join(workdir, 'sessions'),
-                         'secure': 'False'})
+                         'secure': 'False',
+                        })
     conf = os.path.join(workdir, 'ipsilon.conf')
     with open(conf, 'w+') as f:
         f.write(text)
@@ -92,8 +93,9 @@ if __name__ == '__main__':
 
     penv = dict()
     penv.update(os.environ)
-    penv['PYTHONPATH'] = './'
+    penv['PYTHONPATH'] = os.getcwd()
 
+    exe = os.path.join(os.getcwd(), 'ipsilon/ipsilon')
 
     if args['cleanup']:
         shutil.rmtree(args['workdir'])
@@ -103,5 +105,12 @@ if __name__ == '__main__':
     else:
         conf = os.path.join(args['workdir'], 'ipsilon.conf')
 
-    p = subprocess.Popen(['./ipsilon/ipsilon', conf], env=penv)
+    if not os.path.exists(os.path.join(args['workdir'], 'ui')):
+        os.symlink(os.path.join(os.getcwd(), 'ui'),
+                   os.path.join(args['workdir'], 'ui'))
+
+
+    os.chdir(args['workdir'])
+
+    p = subprocess.Popen([exe, conf], env=penv)
     p.wait()