Investigate windows ci failures #557

Closed
pnasrat opened this Issue Jun 2, 2012 · 19 comments

Projects

None yet

6 participants

@pnasrat

http://ci.cloudsilverlining.org/job/pip_python3.2_windows_2008/91/console


======================================================================
ERROR: Failure: SyntaxError (invalid syntax (__init__.py, line 4))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\failure.py", line 37, in runTest
    raise self.exc_class(self.exc_val).with_traceback(self.tb)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "<string>", line None
SyntaxError: invalid syntax (__init__.py, line 4)

======================================================================
ERROR: Failure: SyntaxError (invalid syntax (__init__.py, line 4))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\failure.py", line 37, in runTest
    raise self.exc_class(self.exc_val).with_traceback(self.tb)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\importer.py", line 84, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "<string>", line None
SyntaxError: invalid syntax (__init__.py, line 4)

======================================================================
FAIL: tests.test_requirements.test_parse_editable_local
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\mock-0.8.0-py3.2.egg\mock.py", line 1224, in patched
    return func(*args, **keywargs)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_requirements.py", line 130, in test_parse_editable_local
    (None, 'file://' + os.getcwd(), None)
AssertionError: Tuples differ: (None, 'file:///c%7C%5Chudson%... != (None, 'file://C:\\hudson\\wor...

First differing element 1:
file:///c%7C%5Chudson%5Cworkspace%5Cpip_python3.2_windows_2008
file://C:\hudson\workspace\pip_python3.2_windows_2008

- (None, 'file:///c%7C%5Chudson%5Cworkspace%5Cpip_python3.2_windows_2008', None)
?                ---- ^^^      ^^^         ^^^

+ (None, 'file://C:\\hudson\\workspace\\pip_python3.2_windows_2008', None)
?                 ^^^      ^^         ^^


======================================================================
FAIL: tests.test_requirements.test_parse_editable_local_extras
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\mock-0.8.0-py3.2.egg\mock.py", line 1224, in patched
    return func(*args, **keywargs)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_requirements.py", line 161, in test_parse_editable_local_extras
    (None, 'file://' + os.getcwd(), ('extras',))
AssertionError: Tuples differ: (None, 'file:///c%7C%5Chudson%... != (None, 'file://C:\\hudson\\wor...

First differing element 1:
file:///c%7C%5Chudson%5Cworkspace%5Cpip_python3.2_windows_2008
file://C:\hudson\workspace\pip_python3.2_windows_2008

+ (None, 'file://C:\\hudson\\workspace\\pip_python3.2_windows_2008', ('extras',))
- (None,
-  'file:///c%7C%5Chudson%5Cworkspace%5Cpip_python3.2_windows_2008',
-  ('extras',))

======================================================================
FAIL: tests.test_unicode.test_install_package_that_emits_unicode
Install a package with a setup.py that emits UTF-8 output and then fails.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_unicode.py", line 24, in test_install_package_that_emits_unicode
    assert '__main__.FakeError: this package designed to fail on install' in result.stdout
AssertionError

======================================================================
FAIL: tests.test_upgrade.test_upgrade_vcs_req_with_dist_found
It can upgrade a VCS requirement that has distributions on the index.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_upgrade.py", line 212, in test_upgrade_vcs_req_with_dist_found
    run_pip("install", req)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_pip.py", line 483, in run_pip
    result = env.run('pip', *args, **kw)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_pip.py", line 366, in run
    return TestPipResult(super(TestPipEnvironment, self).run(cwd=cwd, *args, **kw), verbose=self.verbose)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\scripttest-1.2-py3.2.egg\scripttest\__init__.py", line 255, in run
    result.assert_no_error(quiet)
  File "c:\hudson\workspace\pip_python3.2_windows_2008\scripttest-1.2-py3.2.egg\scripttest\__init__.py", line 402, in assert_no_error
    "Script returned code: %s" % self.returncode)
AssertionError: AssertionError: Script returned code: 1
-------------------- >> begin captured stdout << ---------------------
Script result: pip install git+file:///C:/hudson/workspace/pip_python3.2_windows_2008/tests/tests_cache/virtualenv@c21fef2c2d53cf19f49bcc37f9c058a33fb50499#egg=virtualenv
  return code: 1
-- stdout: --------------------
fatal: reference is not a tree: c21fef2c2d53cf19f49bcc37f9c058a33fb50499
Downloading/unpacking virtualenv from git+file:/C:/hudson/workspace/pip_python3.2_windows_2008/tests/tests_cache/virtualenv@c21fef2c2d53cf19f49bcc37f9c058a33fb50499#egg=virtualenv
  Cloning file:///C:/hudson/workspace/pip_python3.2_windows_2008/tests/tests_cache/virtualenv (to c21fef2c2d53cf19f49bcc37f9c058a33fb50499) to c:\hudson\workspace\pip_python3.2_windows_2008\tests\tests_cache\test_ws\.virtualenv\build\virtualenv
  Could not find a tag or branch 'c21fef2c2d53cf19f49bcc37f9c058a33fb50499', assuming commit.
======================================================================
FAIL: tests.test_vcs_backends.test_git_with_tag_name_and_update
Test cloning a git repository and updating to a different version.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_vcs_backends.py", line 70, in test_git_with_tag_name_and_update
    assert '0.1.2\n' in result.stdout
AssertionError

======================================================================
FAIL: tests.test_vcs_backends.test_git_with_non_editable_unpacking
Test cloning a git repository from a non-editable URL with a given tag.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.2_windows_2008\nose-1.1.2-py3.2.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "C:\hudson\workspace\pip_python3.2_windows_2008\tests\test_vcs_backends.py", line 95, in test_git_with_non_editable_unpacking
    assert '0.1.2\n' in result.stdout
AssertionError

----------------------------------------------------------------------
Ran 162 tests in 560.605s

FAILED (failures=6, errors=2, skipped=2)
@pnasrat pnasrat was assigned Jun 2, 2012
@pnasrat

Some obvious stuff \n in assertion and url escaping file:///c%7C%5Chudson%5Cworkspace%5Cpip_python3.2_windows_2008

@pnasrat pnasrat added a commit to pnasrat/pip that referenced this issue Jun 3, 2012
@pnasrat pnasrat Remove unix line ending assumption.
These tests fail on Windows - issue #557
44702b6
@pnasrat

With pull request now down to

FAILED (failures=3, errors=1)
@pnasrat

One looks possibly like scripttest utf8 issue

======================================================================
ERROR: Install a package with a setup.py that emits UTF-8 output and then fails.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python2.6_windows_2008\nose-1.0.0-py2.6.egg\nose\case.py", line 187, in runTest
    self.test(*self.arg)
  File "C:\hudson\workspace\pip_python2.6_windows_2008\tests\test_unicode.py", line 23, in test_install_package_that_emits_unicode
    result = run_pip('install', to_install, expect_error=True)
  File "C:\hudson\workspace\pip_python2.6_windows_2008\tests\test_pip.py", line 483, in run_pip
    result = env.run('pip', *args, **kw)
  File "C:\hudson\workspace\pip_python2.6_windows_2008\tests\test_pip.py", line 366, in run
    return TestPipResult(super(TestPipEnvironment, self).run(cwd=cwd, *args, **kw), verbose=self.verbose)
  File "build\bdist.win32\egg\scripttest\__init__.py", line 246, in run
    stdout = string(stdout).replace('\r\n', '\n')
  File "build\bdist.win32\egg\scripttest\backwardscompat.py", line 9, in string
    return string.decode('utf-8')
  File "C:\hudson\workspace\pip_python2.6_windows_2008\pip_virtualenv\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 387: ordinal not in range(128)
@pnasrat pnasrat referenced this issue Jun 6, 2012
Merged

Mock out getcwd. #568

@pnasrat

------------------------------------------------------------
C:\temp\t\Scripts\pip-script.py run on 07/01/12 14:00:06
Downloading/unpacking virtualenv from git+file:///C:/Development/pip/tests/test_cache/virtaulenv@c21fef2c2d53cf19f49bcc37f9c058a33fb50499

  Cloning file:///C:/Development/pip/tests/test_cache/virtaulenv (to c21fef2c2d53cf19f49bcc37f9c058a33fb50499) to c:\temp\t\build\virtualenv

  Found command 'git' at 'C:\\Users\\Administrator\\AppData\\Local\\GitHub\\PortableGit_656cc1ef6d04f06ddf8b2f5bedbac921caed3b62\\cmd\\git.cmd'
  Running command C:\Users\Administrator\AppData\Local\GitHub\PortableGit_656cc1ef6d04f06ddf8b2f5bedbac921caed3b62\cmd\git.cmd clone -q file:///C:/Development/pip/tests/test_cache/virtaulenv C:\temp\t\build\virtualenv
  Complete output from command C:\Users\Administrator\AppData\Local\GitHub\PortableGit_656cc1ef6d04f06ddf8b2f5bedbac921caed3b62\cmd\git.cmd clone -q file:///C:/Development/pip/tests/test_cache/virtaulenv C:\temp\t\build\virtualenv:


----------------------------------------

Command C:\Users\Administrator\AppData\Local\GitHub\PortableGit_656cc1ef6d04f06ddf8b2f5bedbac921caed3b62\cmd\git.cmd clone -q file:///C:/Development/pip/tests/test_cache/virtaulenv C:\temp\t\build\virtualenv failed with error code 128 in None

Exception information:
Traceback (most recent call last):
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\basecommand.py", line 104, in main
    status = self.run(options, args)
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\commands\install.py", line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\req.py", line 985, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\req.py", line 1103, in unpack_url
    return unpack_vcs_link(link, loc, only_download)
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\download.py", line 294, in unpack_vcs_link
    vcs_backend.unpack(location)
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\vcs\__init__.py", line 233, in unpack
    self.obtain(location)
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\vcs\git.py", line 107, in obtain
    call_subprocess([self.cmd, 'clone', '-q', url, dest])
  File "C:\temp\t\lib\site-packages\pip-1.1-py2.7.egg\pip\__init__.py", line 256, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Users\Administrator\AppData\Local\GitHub\PortableGit_656cc1ef6d04f06ddf8b2f5bedbac921caed3b62\cmd\git.cmd clone -q file:///C:/Development/pip/tests/test_cache/virtaulenv C:\temp\t\build\virtualenv failed with error code 128 in None
@pnasrat

A bunch of the tests in hudson pass on my ec2 py2.7 setup.

@pnasrat

Slow going but I should have made things better. I think there are still some failures - running full suite against a box on EC2.

@pnasrat

I've tried updating the hudson box and running tests in a new env in a new dir to see how we're doing but this doesn't look good.

https://gist.github.com/3029009

@pnasrat

Current failing on ci

======================================================================
ERROR: Failure: SyntaxError (invalid syntax (__init__.py, line 4))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\failure.py", line 37, in runTest
    raise self.exc_class(self.exc_val).with_traceback(self.tb)
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "<string>", line None
SyntaxError: invalid syntax (__init__.py, line 4)

======================================================================
ERROR: Failure: SyntaxError (invalid syntax (__init__.py, line 4))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\failure.py", line 37, in runTest
    raise self.exc_class(self.exc_val).with_traceback(self.tb)
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\importer.py", line 84, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "<string>", line None
SyntaxError: invalid syntax (__init__.py, line 4)

======================================================================
FAIL: Check we are running proper version of pip in run_pip.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "C:\hudson\workspace\pip_python3.1_windows_2008\tests\test_basic.py", line 44, in test_correct_pip_version
    assert not mismatch_py, 'mismatched source files in %r and %r: %r'% (pip_folder, pip_folder_outputed, mismatch_py)
AssertionError: mismatched source files in Path('C:\\hudson\\workspace\\pip_python3.1_windows_2008\\pip') and 'c:\\hudson\\workspace\\pip_python3.1_windows_2008\\tests\\tests_cache\\test_ws\\.virtualenv\\lib\\site-packages\\pip-1.1.post2-py3.1.egg\\pip': ['_pkgutil.py']

======================================================================
FAIL: tests.test_requirements.test_parse_editable_local_extras
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\hudson\workspace\pip_python3.1_windows_2008\mock-0.8.0beta4-py3.1.egg\mock.py", line 1196, in patched
    return func(*args, **keywargs)
  File "C:\hudson\workspace\pip_python3.1_windows_2008\tests\test_requirements.py", line 174, in test_parse_editable_local_extras
    (None, 'file://' + os.path.join("/some/path", 'foo'), ('bar', 'baz'))
AssertionError: Tuples differ: (None, 'file:///some/path/foo'... != (None, 'file:///some/path\\foo...

First differing element 1:
file:///some/path/foo
file:///some/path\foo

- (None, 'file:///some/path/foo', ('bar', 'baz'))
?                          ^

+ (None, 'file:///some/path\\foo', ('bar', 'baz'))
?                          ^^


======================================================================
FAIL: Install a package with a setup.py that emits UTF-8 output and then fails.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python3.1_windows_2008\nose-1.1.2-py3.1.egg\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "C:\hudson\workspace\pip_python3.1_windows_2008\tests\test_unicode.py", line 24, in test_install_package_that_emits_unicode
    assert '__main__.FakeError: this package designed to fail on install' in result.stdout
AssertionError

----------------------------------------------------------------------
Ran 173 tests in 1660.118s

FAILED (failures=3, errors=2, skipped=3)
@qwcode

you still need help on the windows errors?

"SyntaxError: invalid syntax (init.py, line 4)"
I've seen that from what I recall.
I think the nosetests call is finding modules that are not really part of the test suite.

about this discrepancy "['_pkgutil.py']"
that module was removed recently.

I think you''ll have to manually delete it from the workspace
the git clone needs a clean?

tomorrow, I can try to run some tests on my windows laptop and toubleshoot, if you still need help.

@pnasrat

Cleaned build directory which had the _pkgutil which I think was confusing stuff. The path issues looks like an error in my assertion after I mocked all this out. I'll try figure the nose failure too.

@pnasrat pnasrat added a commit to pnasrat/pip that referenced this issue Jul 29, 2012
@pnasrat pnasrat Issue #557 fix test failing on windows.
More path equality fun, use normpath to ensure path sep correct.
57f9be5
@qwcode

there's a number of errors in hudson CI similar to this right now

Traceback (most recent call last):
  File "c:\hudson\workspace\pip_python2.6_windows_2008\nose-1.0.0-py2.6.egg\nose\case.py", line 371, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "c:\hudson\workspace\pip_python2.6_windows_2008\nose-1.0.0-py2.6.egg\nose\util.py", line 478, in try_run
    return func()
  File "C:\hudson\workspace\pip_python2.6_windows_2008\tests\test_util.py", line 20, in setup
    self.mock_dist = Mock(project_name=project)
TypeError: __init__() got an unexpected keyword argument 'project_name'

seems odd. I tried that kind of instantiation on Win7 with mock 0.8.0 and it was fine.
should we check the version of mock that's installed? is it static in the hudson workspace for those jobs?
I don't have an account on hudson yet or access to that server, or I'd check it myself.

@qwcode

FWIW, locally on a py27 win laptop, I was able to whittle down to 4 errors and 2 failures.

mostly related to shutil and cleanup. I'll see if I have time to get to the bottom of those this weekend.

still can't get to http://ci.cloudsilverlining.org/... down? coming up anytime?

I think I'll set up another jenkins linux/windows cluster on rackspace, and try to to keep it running smooth.

we can hope for win/osx support in travis someday: travis-ci/travis-ci#216

@qwcode

considering jannis just tagged and release 1.2 to pypi, I''m taking the release blocker label off this : )

@carljm
@qwcode

closing as this is out of date at this pt.
will open issues for specific windows issues as needed

@qwcode qwcode closed this Jan 22, 2013
@luzfcb

@qwcode and others.

To test on Windows, there is now the option of using the http://www.appveyor.com/
It works much like the Travis CI.

The only python project I know that uses AppVeyor to test against Windows is Cookiecutter

https://github.com/audreyr/cookiecutter/blob/master/appveyor.yml
https://github.com/audreyr/cookiecutter/tree/master/appveyor

AppVeyor is free for open-source project.

@pfmoore
Python Packaging Authority member

@luzfcb Thanks for the pointer. I was aware of Appveyor - the problem is that before we can realistically enable Appveyor, we need to get to a point where the test suite actually works on Windows. I did have a look at this, but lack of time has prevented me making much progress.

@qwcode @dstufft and anyone else: what is the feeling about enabling appveyor testing given that it's going to have a lot of known failures for quite some time? As the appveyor and travis build notifications interfere with each other, we'd probably see a lot of spurious "build failed" messages against perfectly valid PRs, which I don't think we really want. Personally, I think we need some resource able to work on the Windows test failures before we do that.

@Ivoz
Python Packaging Authority member

Absolutely fine with it as long as we can disable on-fail notifications (until its regularly succeeding).

@luzfcb

The problem of interference from multiple CI should be partially solved by Github with the new Github Status API

https://github.com/blog/1935-see-results-from-all-pull-request-status-checks

Would be necessary to verify that the Travis and Appveyor already implement this new API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment