Opened 4 years ago

Closed 4 years ago

#17764 closed defect (fixed)

Jenkins not finding test resources

Reported by: atagar Owned by: tpa
Priority: Low Milestone:
Component: Internal Services/Tor Sysadmin Team Version:
Severity: Minor Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi Peter. I pushed quite a few tests which has assertions against test data we provide...

When I run these tests they pass but on Jenkins they're failing due to being unable to find the test data...

======================================================================
ERROR: test_parsing_example_man_page
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/jenkins-workspace/workspace/stem-tor-ci/test/unit/manual.py", line 118, in test_parsing_example_man_page
    manual = stem.manual.Manual.from_man(EXAMPLE_MAN_PATH)
  File "/srv/jenkins-workspace/workspace/stem-tor-ci/stem/manual.py", line 342, in from_man
    raise IOError("Unable to run 'man --encoding=ascii -P cat %s': %s" % (man_path, exc))
IOError: Unable to run 'man --encoding=ascii -P cat /srv/jenkins-workspace/workspace/stem-tor-ci/test/unit/tor_man_example': [Errno 2] No such file or directory
======================================================================
ERROR: test_with_unknown_options
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/jenkins-workspace/workspace/stem-tor-ci/test/integ/manual.py", line 135, in test_with_unknown_options
    manual = stem.manual.Manual.from_man(os.path.join(os.path.dirname(__file__), 'tor.1_with_unknown'))
  File "/srv/jenkins-workspace/workspace/stem-tor-ci/stem/manual.py", line 342, in from_man
    raise IOError("Unable to run 'man --encoding=ascii -P cat %s': %s" % (man_path, exc))
IOError: Unable to run 'man --encoding=ascii -P cat /srv/jenkins-workspace/workspace/stem-tor-ci/test/integ/tor.1_with_unknown': [Errno 2] No such file or directory

This is interesting since I do this elsewhere (assert against test data) and I'm not spotting from the code if or where I'm buggering up. First guess is that maybe the 'git pull' is somehow not getting those files.

Do I have ssh access for the Jenkins host? I tried to reach it in a similar way I do for DocTor but no luck...

% cat ~/.ssh/config
host doctor
  hostname cappadocicum.torproject.org
  port 22
  identityfile ~/.ssh/torproject
  proxycommand ssh -W %h:22 perdulce.torproject.org

host jenkins
  hostname jenkins.torproject.org
  port 22
  identityfile ~/.ssh/torproject
  proxycommand ssh -W %h:22 perdulce.torproject.org

% ssh jenkins
Permission denied (publickey).

Maybe I'm screwing up or maybe I shouldn't have access. If the later could you please check if these two files exist on disk and if not why git isn't getting them?

Thanks! -Damian

Child Tickets

Change History (9)

comment:1 Changed 4 years ago by weasel

I haven't looked at your failure in detail yet, but can you verify it works for you when you do an out-of-tree build?

comment:2 Changed 4 years ago by atagar

Not entirely sure what you mean by an out-of-tree build, but if by that you mean invoke the tests with a cwd outside of stem then just tried and still passed.

comment:3 Changed 4 years ago by weasel

Ah, this is stem, not tor. So that's not it, sorry.

comment:4 Changed 4 years ago by weasel

It seems you're trying to run man, and I suspect man simply is not installed as it's not a listed build dependency.
(see https://gitweb.torproject.org/project/jenkins/tools.git/tree/slaves/linux/stem-tor-ci/etc/build-depends )

comment:5 Changed 4 years ago by atagar

Hmmmm. The tests should skip themselves if man isn't present...

https://gitweb.torproject.org/stem.git/tree/test/unit/manual.py#n121

I'd expect a different error ("man: command not found") if that was the case. Are the resources the above errors cite present on disk?

comment:6 Changed 4 years ago by atagar

Oh wait, my bad! The is_available() checks are new and the latest test passed. You were completely right.

This can be resolved, though if we could add man to the builds that would be nice. :P

comment:7 Changed 4 years ago by weasel

For both stem-ci-linux and stem-tor-ci?

comment:8 Changed 4 years ago by atagar

Sure, no reason not to and means better test coverage in both spots. Thanks!

comment:9 Changed 4 years ago by weasel

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.