[svn-commits] coreyfarrell: testsuite/asterisk/trunk r5395 - /asterisk/trunk/lib/python/ast...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Aug 7 21:09:25 CDT 2014


Author: coreyfarrell
Date: Thu Aug  7 21:09:21 2014
New Revision: 5395

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5395
Log:
Use relative paths for symbolic links to test artifacts

When using run-local, a temporary symbolic link is created
at /tmp/ast_test_XXXXXX.  Each test is run in an folder named
by the md5 of the test name, with the test name symbolically
linked to that absolute path.  This causes the symbolic link
./astroot/tmp/<testname> to be invalid as soon as run-local
exits.

This change makes symbolic links between the test run folder
and the md5 folder use relative paths.

(closes issue ASTERISK-24126)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3862/

Modified:
    asterisk/trunk/lib/python/asterisk/test_case.py

Modified: asterisk/trunk/lib/python/asterisk/test_case.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/test_case.py?view=diff&rev=5395&r1=5394&r2=5395
==============================================================================
--- asterisk/trunk/lib/python/asterisk/test_case.py (original)
+++ asterisk/trunk/lib/python/asterisk/test_case.py Thu Aug  7 21:09:21 2014
@@ -107,7 +107,10 @@
         except OSError:
             pass
         try:
-            join_path = os.path.join(Asterisk.test_suite_root, self.base)
+            join_path = os.path.relpath(
+                os.path.join(Asterisk.test_suite_root, self.base),
+                os.path.dirname(named_dir)
+            )
             os.symlink(join_path, named_dir)
         except OSError:
             pass




More information about the svn-commits mailing list