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

appveyor treats job as failed even though nosetests succeeded #53

Open
FelixSchwarz opened this issue Oct 11, 2018 · 1 comment
Open

Comments

@FelixSchwarz
Copy link

FelixSchwarz commented Oct 11, 2018

I used this demo app to get started with appveyor. Builds seem to work (nosetests succeeds to run the test, xunit xml was uploaded) but I still see a red bar on the left in the appveyor web ui. Also the job is marked as "failed" (e.g. failure notification via email).

I assume this comes from nosetests' output on stderr:

copying build\lib.win32-2.7\pyappveyordemo\extension.pyd -> pyappveyordemo
python.exe : .
At line:2 char:1
+ &$env:PYTHON\python setup.py nosetests --with-xunit
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
----------------------------------------------------------------------
Ran 1 test in 0.031s
OK
Command executed with exception: ----------------------------------------------------------------------
Ran 1 test in 0.031s
OK
# this uploads nosetests.xml produced in test_script step
$wc = New-Object 'System.Net.WebClient'

I there anything we can do about this? I like nosetests for my projects so that is fine but I hope there is a way to tell appveyor that stderr output is fine if the exit code is 0.

@FelixSchwarz FelixSchwarz changed the title appveyor displays red border in its web ui even though the job succeeded appveyor treats job as failed even though nosetests succeeded Oct 11, 2018
@FelixSchwarz
Copy link
Author

As far as I know this (treating a job as failed if there is output on STDERR) is a powershell "feature". My workaround right now is to replace the ps call in test_script with:

 - "python setup.py nosetests --with-xunit"

FelixSchwarz added a commit to FelixSchwarz/pymta that referenced this issue Oct 12, 2018
Without this change appveyor treats all builds as "failed" even though
nosetests passes. This is because the PowerShell calls returns a failure.
The root cause seems to be that PowerShell treats output on STDERR as
errors and nosetests prints its status to STDERR.

Right now I don't see a reason why we actually need PowerShell here
so just get rid of it.

see also ogrisel/python-appveyor-demo#53
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

1 participant