[asterisk-dev] [Code Review] 3862: testsuite: run-local creates broken symlinks for tests

Corey Farrell reviewboard at asterisk.org
Thu Jul 31 14:25:18 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3862/
-----------------------------------------------------------

(Updated July 31, 2014, 3:25 p.m.)


Review request for Asterisk Developers.


Changes
-------

Rewrite description to be more clear about the problem, copy example 'ls -l' from JIRA.


Bugs: ASTERISK-24126
    https://issues.asterisk.org/jira/browse/ASTERISK-24126


Repository: testsuite


Description (updated)
-------

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.

* Future runs of the same test fail to find log files.
* Test artifacts can only be viewed through the md5 folders, making it difficult to know what test you are looking at.
* The artifacts structure is broken if it is archived, unless it's put in the original folder.  This issue applies even without using run-local.

I believe the solution is to symbolic link the test run folder to the md5 folder using relative paths.


Diffs
-----

  /asterisk/trunk/lib/python/asterisk/test_case.py 5316 

Diff: https://reviewboard.asterisk.org/r/3862/diff/


Testing (updated)
-------

./run-local run -t tests/channels/SIP/path;
./run-local run -t tests/predial

Both tests resulted in symbolic links from astroot/tmp/<testname> to the md5 folder.

Before path:
$ ls -lh astroot/tmp/channels/SIP/
total 0
lrwxrwxrwx 1 cfarrell cfarrell 57 Jul 25 22:12 path -> /tmp/ast_test_1YM84W/tmp/8b45633c808b7fa365b7fd61078fc1a2

After patch:
$ ls -lh astroot/tmp/channels/SIP/
total 0
lrwxrwxrwx 1 cfarrell cfarrell 38 Jul 25 21:57 path -> ../../8b45633c808b7fa365b7fd61078fc1a2


Thanks,

Corey Farrell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140731/eeb1858a/attachment-0001.html>


More information about the asterisk-dev mailing list