question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

-gdt flag is breaking stryker on azure pipelines run on linux agents

See original GitHub issue

Describe the bug

I’m trying to run stryker on a azure pipeline running on an ubuntu agent with a powershell task like this:

  - task: PowerShell@2
    displayName: "Run mutations diff"
    inputs:
      targetType: "inline"
      script: |
        $targetBranchName = "$(System.PullRequest.TargetBranch)" -Replace "refs/heads/",""

        $(Agent.BuildDirectory)/tools/dotnet-stryker -s $(solutionFullName) -cp $(configRelativePath) -diff -gdt 'origin/$targetBranchName'

Yet it simply breaks the task with an exit code 1.

2021-01-26T18:31:28.8622586Z ##[debug] dotnet stryker -s /home/vsts/work/1/s/Template.sln -cp ./files/mutation_tests/stryker-config.json -diff -gdt 'origin/develop'
2021-01-26T18:31:30.2770189Z    _____ _              _               _   _ ______ _______ Â 
2021-01-26T18:31:30.2770667Z   / ____| |            | |             | \ | |  ____|__   __|Â 
2021-01-26T18:31:30.2771130Z  | (___ | |_ _ __ _   _| | _____ _ __  |  \| | |__     | |   Â 
2021-01-26T18:31:30.2771598Z   \___ \| __| '__| | | | |/ / _ \ '__| | . ` |  __|    | |   Â 
2021-01-26T18:31:30.2772269Z   ____) | |_| |  | |_| |   <  __/ |    | |\  | |____   | |   Â 
2021-01-26T18:31:30.2772751Z  |_____/ \__|_|   \__, |_|\_\___|_| (_)|_| \_|______|  |_|   Â 
2021-01-26T18:31:30.2773219Z                    __/ |                                     Â 
2021-01-26T18:31:30.2773677Z                   |___/                                      Â 
2021-01-26T18:31:30.2774195Z 
2021-01-26T18:31:30.2947519Z  Version: 0.21.1 (beta)
2021-01-26T18:31:30.2947772Z 
2021-01-26T18:31:30.6567268Z ##[error]PowerShell exited with code '1'.
2021-01-26T18:31:30.6596189Z ##[section]Finishing: Run mutations diff

Logs

No logs get generated at all.

Expected behavior

I expected stryker to mutated my solution projects with diff enabled and regarding the branch passed as a parameter to the gdt directive.

Desktop (please complete the following information):

  • OS: az-agent ubuntu-latest (ubuntu 20.04)
  • Type of project: .Net
  • Framework Version: .Net 5.0
  • Stryker Version: beta 0.21.1

Additional context

When running stryker with the same options on a windows-latest agent everything works as expected. It also works fine if I remove the gdt directive on ubuntu.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
raschmittcommented, Mar 24, 2021

@Mobrockers I’m gonna have a try tonight [UTC -3].

0reactions
rouke-broersmacommented, Mar 26, 2021

@Mobrockers Sorry for the late, I run it just onde but it seems to be working just fine on 0.22.1.

Here is the pipeline where I run it https://dev.azure.com/raschmitt/raschmitt/_build/results?buildId=679&view=results

I think we might close this issue for now.

No problem 😃 Glad to hear it works now!

Now that I think about it I remember this issue is due to using Ubuntu 20. The library we use for git did not have support for Ubuntu 20 and we fixed that in the latest release!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrating Stryker.NET in your azure pipelines
This means you can run mutation testing for every pull request ... This will break your pipeline if a minimum mutation score wasn't...
Read more >
Microsoft.TestPlatform.Portable vstest.console.dll does not ...
Azure pipelines Microsoft hosted agent (ubuntu-latest, macos-latest) Microsoft. ... This flag helps break the vstest.console at the start.
Read more >
Installing Stryker in pipelines
When running stryker in your pipeline there are some things to take into consideration. ... Example for installing in azure devops: - task:...
Read more >
Self-hosted Linux agents - Azure Pipelines
Learn how you can easily deploy a self-hosted agent on Linux for Azure Pipelines.
Read more >
Adding caching to Azure Pipelines - Azure DevOps Blog
In this post, Ben Gelens describes the process of configuring Azure Pipelines Agents to run on Azure Container Instances (ACI) for both Linux...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found