[asterisk-bugs] [JIRA] (ASTERISK-23244) [patch] testsuite: run-local fails to recognize modules

Walter Doekes (JIRA) noreply at issues.asterisk.org
Wed Feb 5 13:57:03 CST 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-23244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=214859#comment-214859 ] 

Walter Doekes commented on ASTERISK-23244:
------------------------------------------

That's funny, because I ran a single test from run-local (to test that the patch fixed this modules bug) and that worked.. odd.

It fails far from "all tests" over here. It mostly starts failing when we get to cdr's that are not found in one of those double paths.

{noformat}
$ ./run-local run
Running tests for Asterisk SVN-branch-11-r403450
 ...

--> Running test 'tests/example' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/example/run-test'] ...
Checking to see if Asterisk is installed ...
Asterisk not found!
Test ['tests/example/run-test', 'SVN-branch-11-r403450'] failed

--> tests/dynamic-modules ... skipped 'See ASTERISK-19567'
--> Running test 'tests/manager/login' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/manager/login/run-test'] ...
Test ['tests/manager/login/run-test', 'SVN-branch-11-r403450'] passed

--> Running test 'tests/manager/action-events-response' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/manager/action-events-response/run-test'] ...
testing with brokeneventsaction off (default)
sending 'EventMask: '
sending 'EventMask: ON'
sending 'EventMask: yes'
sending 'EventMask: all'
sending 'EventMask: all,user'
sending 'EventMask: system,user,agent'
sending 'EventMask: off'
sending 'EventMask: none'
sending 'EventMask: yeah whatever'
sending 'EventMask: 1'
testing with brokeneventsaction on
sending 'EventMask: '
sending 'EventMask: ON'
sending 'EventMask: yes'
sending 'EventMask: all'
sending 'EventMask: all,user'
sending 'EventMask: system,user,agent'
sending 'EventMask: off'
sending 'EventMask: none'
sending 'EventMask: yeah whatever'
sending 'EventMask: 1'
test passed
Test ['tests/manager/action-events-response/run-test', 'SVN-branch-11-r403450'] passed

--> Running test 'tests/manager/authlimit' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/manager/authlimit/run-test'] ...
starting asterisk
connecting 5 clients to asterisk
attempting to connect one more, this should fail
connecting and authenticating 5 clients to asterisk
attempting to connect one more, this should succeed
test passed
Test ['tests/manager/authlimit/run-test', 'SVN-branch-11-r403450'] passed

--> Running test 'tests/manager/authtimeout' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/manager/authtimeout/run-test'] ...
starting asterisk
testing timeout of an unauthenticated session
testing timeout of an authenticated session (should not timeout)
test passed
Test ['tests/manager/authtimeout/run-test', 'SVN-branch-11-r403450'] passed

--> Running test 'tests/manager/acl-login' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/manager/acl-login/run-test'] ...
[Feb 05 20:51:35] ERROR[23119]: __main__:92 ami_connect: AMI 1: Login was allowed and it shouldn't have been.
[Feb 05 20:51:35] ERROR[23119]: __main__:92 ami_connect: AMI 2: Login was allowed and it shouldn't have been.
[Feb 05 20:51:35] ERROR[23119]: __main__:92 ami_connect: AMI 3: Login was allowed and it shouldn't have been.
[Feb 05 20:51:35] ERROR[23119]: __main__:92 ami_connect: AMI 9: Login was allowed and it shouldn't have been.
[Feb 05 20:51:35] ERROR[23119]: __main__:92 ami_connect: AMI 10: Login was allowed and it shouldn't have been.
[Feb 05 20:51:35] ERROR[23119]: __main__:92 ami_connect: AMI 11: Login was allowed and it shouldn't have been.
[Feb 05 20:51:36] ERROR[23119]: __main__:149 evaluate_success: Not all logins that were expected to be allowed were completed. Missed: [5]
[Feb 05 20:51:36] ERROR[23119]: __main__:153 evaluate_success: An AMI login was allowed which was not expected.
Test ['tests/manager/acl-login/run-test', 'SVN-branch-11-r403450'] failed

--> Cannot run test 'tests/manager/bridge_actions'
--- --> Minimum Version: 12.0.0 (False)
--- --> Tags: ['bridge']

--> Running test 'tests/manager/danger/dangerous' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/manager/danger/dangerous/run-test'] ...
Test ['tests/manager/danger/dangerous/run-test', 'SVN-branch-11-r403450'] passed

--> Running test 'tests/manager/danger/safe' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['tests/manager/danger/safe/run-test'] ...
[Feb 05 20:51:40] ERROR[23258]: __main__:38 on_get_var: Dangerous execution failed. Expected: '' Actual: 'hi'
Test ['tests/manager/danger/safe/run-test', 'SVN-branch-11-r403450'] failed

--> Running test 'tests/cdr/console_dial_sip_answer' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['./lib/python/asterisk/test_runner.py', 'tests/cdr/console_dial_sip_answer'] ...
[Feb 05 20:51:44] ERROR[23321]: astcsv:101 __init__: IOError 2[No such file or directory] while opening file '/tmp/ast_test_B8OyYD/tmp/61308166a96b6a52379d2a1f00eec667/ast1//tmp/ast_test_B8OyYD/var/log/asterisk/cdr-csv/cdrtest_local.csv'
[Feb 05 20:51:44] ERROR[23321]: astcsv:106 __init__: Unable to open file '/tmp/ast_test_B8OyYD/tmp/61308166a96b6a52379d2a1f00eec667/ast1//tmp/ast_test_B8OyYD/var/log/asterisk/cdr-csv/cdrtest_local.csv'
[Feb 05 20:51:44] WARNING[23321]: astcsv:128 match: CSV MATCH FAILED, different number of records, self=1 and other=0
[Feb 05 20:51:44] ERROR[23321]: cdr:91 match_cdrs: cdrtest_local.csv: actual did not match expected.
[Feb 05 20:51:44] ERROR[23321]: astcsv:101 __init__: IOError 2[No such file or directory] while opening file '/tmp/ast_test_B8OyYD/tmp/61308166a96b6a52379d2a1f00eec667/ast1//tmp/ast_test_B8OyYD/var/log/asterisk/cdr-csv/cdrtest_sip.csv'
[Feb 05 20:51:44] ERROR[23321]: astcsv:106 __init__: Unable to open file '/tmp/ast_test_B8OyYD/tmp/61308166a96b6a52379d2a1f00eec667/ast1//tmp/ast_test_B8OyYD/var/log/asterisk/cdr-csv/cdrtest_sip.csv'
[Feb 05 20:51:44] WARNING[23321]: astcsv:128 match: CSV MATCH FAILED, different number of records, self=1 and other=0
[Feb 05 20:51:44] ERROR[23321]: cdr:91 match_cdrs: cdrtest_sip.csv: actual did not match expected.
Test ['./lib/python/asterisk/test_runner.py', 'tests/cdr/console_dial_sip_answer', 'SVN-branch-11-r403450'] failed

--> Running test 'tests/cdr/console_dial_sip_busy' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running ['./lib/python/asterisk/test_runner.py', 'tests/cdr/console_dial_sip_busy'] ...
[Feb 05 20:51:48] ERROR[23389]: astcsv:101 __init__: IOError 2[No such file or directory] while opening file '/tmp/ast_test_B8OyYD/tmp/fba94a8c9553442b2fd5822586fad31e/ast1//tmp/ast_test_B8OyYD/var/log/asterisk/cdr-csv/cdrtest_local.csv'
[Feb 05 20:51:48] ERROR[23389]: astcsv:106 __init__: Unable to open file '/tmp/ast_test_B8OyYD/tmp/fba94a8c9553442b2fd5822586fad31e/ast1//tmp/ast_test_B8OyYD/var/log/asterisk/cdr-csv/cdrtest_local.csv'
[Feb 05 20:51:48] WARNING[23389]: astcsv:128 match: CSV MATCH FAILED, different number of records, self=1 and other=0
[Feb 05 20:51:48] ERROR[23389]: cdr:91 match_cdrs: cdrtest_local.csv: actual did not match expected.
Test ['./lib/python/asterisk/test_runner.py', 'tests/cdr/console_dial_sip_busy', 'SVN-branch-11-r403450'] failed

{noformat}




                
> [patch] testsuite: run-local fails to recognize modules
> -------------------------------------------------------
>
>                 Key: ASTERISK-23244
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23244
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Tests/testsuite
>    Affects Versions: SVN
>            Reporter: Corey Farrell
>         Attachments: issueA23244_testsuite-run-locals-local-modules.patch, testsuite-run-local.patch
>
>
> When lib/python/asterisk/test_config.py checks for an asterisk module, it fails to adjust path by $AST_TEST_ROOT.  This prevents asterisk modules from being found from within run-local.
> Additionally when 'run-local setup' configures asterisk, it does not enable dev-mode, TEST_FRAMEWORK or DONT_OPTIMIZE.  This change can be avoided by running configure yourself before run-local setup, but a large number of tests require TEST_FRAMEWORK.  Since run-local doesn't currently work, now seems like a good time to set reasonable defaults.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list