Skip to content

Update travis-ci script so that PRs can fail due to pester tests - #4830

Merged
Travis Plunk (TravisEz13) merged 7 commits into
PowerShell:masterfrom
TravisEz13:FixTravisCiPrs
Sep 13, 2017
Merged

Travis Plunk (TravisEz13) merged 7 commits into
PowerShell:masterfrom
TravisEz13:FixTravisCiPrs

Conversation

@TravisEz13

@TravisEz13 Travis Plunk (TravisEz13) commented Sep 13, 2017 •

Copy link
Copy Markdown
Member

FYI Mark Kraus (@markekraus)

Test-PSPesterResults was expected to throw an error by the travis.ps1. It was only writing to the host.

I've updated Test-PSPesterResults to throw an error after it writes to the host.

I've also added a switch to Start-PSPester which will inject a failing test and the [includeFailingTest] in travis.ps1 which will use this switch so we can verify that it works.

@daxian-dbw

Copy link
Copy Markdown
Member

Travis Plunk (@TravisEz13) can you please briefly describe the issue, root cause and explain the fix? That would be helpful to the review.

@TravisEz13

Copy link
Copy Markdown
Member Author

Dongbo Wang (@daxian-dbw) updated the description.

Comment thread tools/failingTests/fail.tests.ps1 Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the line ending later. I'll use this change to remove the tag that forces a test failure.

Comment thread tools/travis.ps1 Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this change already done in #4807?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased and resolved the issue.

@TravisEz13

Copy link
Copy Markdown
Member Author

Verified tests fail correctly here: https://travis-ci.org/PowerShell/PowerShell/jobs/275168248

@markekraus Mark Kraus (markekraus) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 minor formatting comments, otherwise LGTM

Comment thread build.psm1 Outdated
[switch]$IncludeFailingTest
)

if($IncludeFailingTest.IsPresent)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space between if and (

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

Comment thread tools/travis.ps1
}

if($hasRunFailingTestTag)
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space between if and (

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

@TravisEz13
Travis Plunk (TravisEz13) merged commit ea7c2bd into PowerShell:master Sep 13, 2017
@TravisEz13
Travis Plunk (TravisEz13) deleted the FixTravisCiPrs branch September 13, 2017 21:14
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…erShell#4830)

* Add a switch to force tests to fail for testing CI system to Start-PSPester
* [includeFailingTest] Add commit tag to force tests to fail for testing CI system
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

Successfully merging this pull request may close these issues.

4 participants