Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures #422

Closed
sr-murthy opened this issue May 27, 2016 · 1 comment
Closed

Test failures #422

sr-murthy opened this issue May 27, 2016 · 1 comment

Comments

@sr-murthy
Copy link

sr-murthy commented May 27, 2016

I am trying to fix test errors in the tests.test_locust_class submodule related to the PR #416 but I am getting the error below. I am running Python 2.7.10 on OS X 10.10.5.

$ python setup.py test -m test_locust_class
running test
Searching for gevent==1.0.1
Reading https://pypi.python.org/simple/gevent/
Best match: gevent 1.0.1
Downloading https://pypi.python.org/packages/6e/92/773892c87654a67669fd936e1fa3c37ef1a4dd464066df6bebfbd00745a1/gevent-1.0.1.tar.gz#md5=7b952591d1a0174d6eb6ac47bd975ab6
Processing gevent-1.0.1.tar.gz
Writing /var/folders/md/qy7y7r3d2zn7wfmcpvc2mtk80000gn/T/easy_install-XIOQBW/gevent-1.0.1/setup.cfg
Running gevent-1.0.1/setup.py -q bdist_egg --dist-dir /var/folders/md/qy7y7r3d2zn7wfmcpvc2mtk80000gn/T/easy_install-XIOQBW/gevent-1.0.1/egg-dist-tmp-MvbONI
Running '/bin/sh /private/var/folders/md/qy7y7r3d2zn7wfmcpvc2mtk80000gn/T/easy_install-XIOQBW/gevent-1.0.1/libev/configure > configure-output.txt' in /private/var/folders/md/qy7y7r3d2zn7wfmcpvc2mtk80000gn/T/easy_install-XIOQBW/gevent-1.0.1/build/temp.macosx-10.10-intel-2.7/libev
In file included from gevent/gevent.core.c:313:
In file included from gevent/libev.h:2:
libev/ev.c:477:48: warning: '/*' within block comment [-Wcomment]
/*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */
                                               ^
libev/ev.c:970:42: error: '_Noreturn' keyword must precede function declarator
  ecb_inline void ecb_unreachable (void) ecb_noreturn;
                                         ^~~~~~~~~~~~
  _Noreturn 
libev/ev.c:773:26: note: expanded from macro 'ecb_noreturn'
  #define ecb_noreturn   _Noreturn
                         ^
libev/ev.c:1531:31: warning: 'extern' variable has an initializer [-Wextern-initializer]
  EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */
                              ^
libev/ev.c:1702:7: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ANPENDING, pendings [pri], pendingmax [pri], w_->pending, EMPTY2);
      ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:1713:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (W, rfeeds, rfeedmax, rfeedcnt + 1, EMPTY2);
  ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:1840:7: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (int, fdchanges, fdchangemax, fdchangecnt, EMPTY2);
      ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
In file included from gevent/gevent.core.c:313:
In file included from gevent/libev.h:2:
In file included from libev/ev.c:2390:
libev/ev_kqueue.c:50:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2);
  ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
In file included from gevent/gevent.core.c:313:
In file included from gevent/libev.h:2:
In file included from libev/ev.c:2396:
libev/ev_poll.c:66:7: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2);
      ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:3554:34: warning: '&' within '|' [-Wbitwise-op-parentheses]
  fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
                       ~~~~~~~~~~^~~~~~~~~~~~~ ~
libev/ev.c:3554:34: note: place parentheses around the '&' expression to silence this warning
  fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
                                 ^
                       (                      )
libev/ev.c:3593:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ANHE, timers, timermax, ev_active (w) + 1, EMPTY2);
  ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:4273:5: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (ev_idle *, idles [ABSPRI (w)], idlemax [ABSPRI (w)], active, EMPTY2);
    ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:4313:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_prepare *, prepares, preparemax, preparecnt, EMPTY2);
  ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:4351:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_check *, checks, checkmax, checkcnt, EMPTY2);
  ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:4498:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_fork *, forks, forkmax, forkcnt, EMPTY2);
  ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
libev/ev.c:4581:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_async *, asyncs, asyncmax, asynccnt, EMPTY2);
  ^
libev/ev.c:1664:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
14 warnings and 1 error generated.
error: Setup script exited with error: command 'cc' failed with exit status 1
@sr-murthy
Copy link
Author

That errors disappears after having uninstalled gevent version 1.1.1, and installed version 1.0.1, but now I am getting the following error:

python setup.py test
running test
Searching for pyzmq
Best match: pyzmq 15.2.0
Processing pyzmq-15.2.0-py2.7-macosx-10.6-intel.egg

Using /Users/srm/Documents/sandeep/cst/dev/locust/.eggs/pyzmq-15.2.0-py2.7-macosx-10.6-intel.egg
Searching for unittest2
Best match: unittest2 1.1.0
Processing unittest2-1.1.0-py2.7.egg

Using /Users/srm/Documents/sandeep/cst/dev/locust/.eggs/unittest2-1.1.0-py2.7.egg
Searching for traceback2
Best match: traceback2 1.4.0
Processing traceback2-1.4.0-py2.7.egg

Using /Users/srm/Documents/sandeep/cst/dev/locust/.eggs/traceback2-1.4.0-py2.7.egg
Searching for linecache2
Best match: linecache2 1.0.0
Processing linecache2-1.0.0-py2.7.egg

Using /Users/srm/Documents/sandeep/cst/dev/locust/.eggs/linecache2-1.0.0-py2.7.egg
running egg_info
writing pbr to locustio.egg-info/pbr.json
writing requirements to locustio.egg-info/requires.txt
writing locustio.egg-info/PKG-INFO
writing top-level names to locustio.egg-info/top_level.txt
writing dependency_links to locustio.egg-info/dependency_links.txt
writing entry points to locustio.egg-info/entry_points.txt
reading manifest file 'locustio.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'locustio.egg-info/SOURCES.txt'
running build_ext
locust (unittest2.loader._FailedTest) ... ERROR

======================================================================
ERROR: locust (unittest2.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: locust
Traceback (most recent call last):
  File "/Users/srm/Documents/sandeep/cst/dev/locust/.eggs/unittest2-1.1.0-py2.7.egg/unittest2/loader.py", line 490, in _find_test_path
    package = self._get_module_from_name(name)
  File "/Users/srm/Documents/sandeep/cst/dev/locust/.eggs/unittest2-1.1.0-py2.7.egg/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/Users/srm/Documents/sandeep/cst/dev/locust/locust/__init__.py", line 1, in <module>
    from core import HttpLocust, Locust, TaskSet, task
  File "/Users/srm/Documents/sandeep/cst/dev/locust/locust/core.py", line 110, in <module>
    class HttpLocust(Locust):
  File "/Users/srm/Documents/sandeep/cst/dev/locust/locust/core.py", line 127, in HttpLocust
    def __init__(self, host=socket.gethostbyname(socket.gethostname())):
  File "/Library/Python/2.7/site-packages/gevent/socket.py", line 613, in gethostbyname
    return get_hub().resolver.gethostbyname(hostname)
  File "/Library/Python/2.7/site-packages/gevent/resolver_thread.py", line 28, in gethostbyname
    return self.pool.apply_e(self.expected_errors, _socket.gethostbyname, args)
  File "/Library/Python/2.7/site-packages/gevent/threadpool.py", line 225, in apply_e
    raise result
gaierror: [Errno 8] nodename nor servname provided, or not known


----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)

@heyman heyman closed this as completed Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants