Closed AlbertoMonteiro closed 3 years ago
It looks like a dependency (Buildalyzer) we use to scan your project cannot find the dotnet core executable on your system. Have you installed dotnet core in a non-standard way?
@rouke-broersma Thanks for the fast anwser. The instalation is basically that
FROM registry.access.redhat.com/ubi8:latest
yum install -y --setopt=tsflags=nodocs lttng-ust && \
yum install -y --setopt=tsflags=nodocs libicu && \
mkdir /.dotnet && \
tar -xzf aspnetcore-runtime-5.0.8-linux-x64.tar.gz -C /.dotnet/ && \
rm -rf /app && \
yum clean all -y && \
rm -rf /var/cache/yum/*
ENV DOTNET_ROOT=/.dotnet
ENV DOTNET_BUNDLE_EXTRACT_BASE_DIR=/.dotnet/tools/tmp
ENV PATH=/.dotnet/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/.dotnet/sdk/5.0.103/DotnetTools:/root/.dotnet/tools
WORKDIR /
That does not seem like a standard way to install dotnet. It also looks like you're extracting a runtime package of dotnet and not an sdk package. Does this container work for building your app?
@rouke-broersma I fixed it installing the tool in the path /.dotnet/sdk/5.0.103/DotnetTools
that does have more permission then the default folder when you install it globally.
Tyvm.
Glad you worked it out! Hope you enjoy stryker :)
That does not seem like a standard way to install dotnet. It also looks like you're extracting a runtime package of dotnet and not an sdk package. Does this container work for building your app?
Yeah, I pasted wrongly, we have 2 dockerfiles, one for build and other to run, I got the .tar from the other dockerfile hehe
I am in love with stryker, using it on my own machine for 2 months and now I am going to integrate on our CI pipeline.
Thanks for that awesome tool!!!!
Describe the bug When running
dotnet-stryker
I get the errorLogs
``` dotnet-stryker -s ../../Brand.CustomerData.sln -l trace [33m _____ _ _ _ _ ______ _______ / ____| | | | | \ | | ____|__ __| | (___ | |_ _ __ _ _| | _____ _ __ | \| | |__ | | \___ \| __| '__| | | | |/ / _ \ '__| | . ` | __| | | ____) | |_| | | |_| | < __/ | | |\ | |____ | | |_____/ \__|_| \__, |_|\_\___|_| (_)|_| \_|______| |_| __/ | |___/ [0m Version: [32m0.22.11[0m [14:30:35 INF] Logging enabled at level Info [14:30:35 DBG] Stryker started with options: {"BasePath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests","SolutionPath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/../../Brand.CustomerData.sln","OutputPath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/StrykerOutput/2021-10-13.14-30-34","ProjectUnderTest":null,"BaselineProvider":"Disk","Reporters":["Progress","Html"],"LogOptions":{"LogToFile":false,"OutputPath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/StrykerOutput/2021-10-13.14-30-34","LogLevel":"Verbose"},"DevMode":false,"ProjectUnderTestNameFilter":null,"DiffEnabled":false,"CompareToDashboard":false,"GitDiffSource":"master","AdditionalTimeoutMS":5000,"ExcludedMutations":[],"IgnoredMethods":[],"ConcurrentTestRunners":4,"Thresholds":{"High":80,"Low":60,"Break":0},"TestRunner":"VsTest","FilePatterns":[{"Glob":{"Tokens":[{"TrailingPathSeparator":{"Value":"/"},"LeadingPathSeparator":null},{}]},"IsExclude":false,"TextSpans":[{"Start":0,"Length":2147483647}]}],"LanguageVersion":"Latest","Optimizations":"CoverageBasedTest, AbortTestOnKill","OptimizationMode":"perTest","TestProjects":[],"DashboardUrl":"https://dashboard.stryker-mutator.io","DashboardApiKey":null,"ProjectName":null,"ModuleName":null,"ProjectVersion":null,"MutationLevel":"Standard","DiffIgnoreFiles":[],"AzureSAS":null,"AzureFileStorageUrl":null,"FallbackVersion":"master"} [14:30:35 INF] Identifying project to mutate. [14:30:35 VRB] Scanned the directory /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests for *.csproj files: found ["/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj"] [14:30:35 VRB] Found project file /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj in path /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests [14:30:35 DBG] Using /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj as test project [14:30:35 DBG] Analyzing solution file /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/../../Brand.CustomerData.sln [14:30:35 DBG] Analyzing project file /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj [14:30:35 INF] Time Elapsed 00:00:00.3914235 Unhandled exception. System.ComponentModel.Win32Exception (2): No such file or directory at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Buildalyzer.Environment.ProcessRunner.Start() at Buildalyzer.Environment.DotnetPathResolver.GetInfo(String projectPath, String dotnetExePath) at Buildalyzer.Environment.DotnetPathResolver.ResolvePath(String projectPath, String dotnetExePath) at Buildalyzer.Environment.EnvironmentFactory.CreateCoreEnvironment(EnvironmentOptions options) at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options) at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build(String targetFramework) at Buildalyzer.ProjectAnalyzer.Build() at Stryker.Core.Initialisation.ProjectFileReader.AnalyzeProject(String projectFilePath, String solutionFilePath) at Stryker.Core.Initialisation.InputFileResolver.ResolveInput(IStrykerOptions options) at Stryker.Core.Initialisation.InitialisationProcess.Initialize(IStrykerOptions options) at Stryker.Core.Initialisation.ProjectMutator.MutateProject(IStrykerOptions options, IReporter reporters) at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters)+MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Stryker.Core.StrykerRunner.RunMutationTest(StrykerOptions options, IEnumerable`1 initialLogMessages) at Stryker.CLI.StrykerCLI.RunStryker(StrykerOptions options) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 135 at Stryker.CLI.StrykerCLI.<>c__DisplayClass7_0.Expected behavior The mutation test should happen properly
Desktop:
OS
``` NAME="Red Hat Enterprise Linux" VERSION="8.3 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.3" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA" Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 8 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 85 Model name: Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz Stepping: 0 CPU MHz: 2693.672 BogoMIPS: 5387.34 Hypervisor vendor: VMware Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 1024K L3 cache: 39424K NUMA node0 CPU(s): 0-7 ```Additional context Also tried with version: 0.22.11