[asterisk-commits] mnicholson: testsuite/asterisk/trunk r135 - /asterisk/trunk/asttest/self-test...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 24 15:50:22 CDT 2010


Author: mnicholson
Date: Wed Mar 24 15:50:18 2010
New Revision: 135

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=135
Log:
Added better error reporting to the spawn_asterisk self test

Modified:
    asterisk/trunk/asttest/self-tests/spawn_asterisk/test.lua

Modified: asterisk/trunk/asttest/self-tests/spawn_asterisk/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/asttest/self-tests/spawn_asterisk/test.lua?view=diff&rev=135&r1=134&r2=135
==============================================================================
--- asterisk/trunk/asttest/self-tests/spawn_asterisk/test.lua (original)
+++ asterisk/trunk/asttest/self-tests/spawn_asterisk/test.lua Wed Mar 24 15:50:18 2010
@@ -7,7 +7,13 @@
 res, err = a:term_or_kill()
 
 if res == nil then
-	fail("error running asterisk: " .. err)
+	if err == "core" then
+		fail("asterisk crashed")
+	elseif type(err) == number then
+		fail("asterisk exited from signal: " .. err)
+	else
+		fail("error running asterisk (err ==  " .. err .. ")")
+	end
 elseif res ~= 0 then
 	fail("asterisk exited with status " .. res)
 end




More information about the asterisk-commits mailing list