[asterisk-commits] mjordan: testsuite/asterisk/trunk r5032 - /asterisk/trunk/runtests.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 14 12:56:49 CDT 2014


Author: mjordan
Date: Wed May 14 12:56:41 2014
New Revision: 5032

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5032
Log:
runtests: Don't attempt to archive the Test Suite logs if they don't exist

Some tests don't create Test Suite logs, because they are old and crufy and
get off my lawn with your fancy Python logging (in my day, we only had stdout
and we liked it). Don't attempt to archive things that don't exist.

Modified:
    asterisk/trunk/runtests.py

Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=5032&r1=5031&r2=5032
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Wed May 14 12:56:41 2014
@@ -141,10 +141,12 @@
                                    'run_%d' % run_num)
         self._archive_ast_logs(run_num, run_dir, archive_dir)
         self._archive_pcap_dump(run_dir, archive_dir)
-        hardlink_or_copy(os.path.join(run_dir, 'messages.txt'),
-                         os.path.join(archive_dir, 'messages.txt'))
-        hardlink_or_copy(os.path.join(run_dir, 'full.txt'),
-                         os.path.join(archive_dir, 'full.txt'))
+        if os.path.exists(os.path.join(run_dir, 'messages.txt')):
+            hardlink_or_copy(os.path.join(run_dir, 'messages.txt'),
+                             os.path.join(archive_dir, 'messages.txt'))
+        if os.path.exists(os.path.join(run_dir, 'full.txt')):
+            hardlink_or_copy(os.path.join(run_dir, 'full.txt'),
+                             os.path.join(archive_dir, 'full.txt'))
 
     def _archive_ast_logs(self, run_num, run_dir, archive_dir):
         """Archive the Asterisk logs"""




More information about the asterisk-commits mailing list