diff --git a/assemblies-valid/AssembliesValid.cs b/assemblies-valid/AssembliesValid.cs index c00a1fa..8a6edb1 100644 --- a/assemblies-valid/AssembliesValid.cs +++ b/assemblies-valid/AssembliesValid.cs @@ -44,7 +44,7 @@ public class AssembliesValid public void ValidateAssemblies() { string dotnetPath = null; - int exitCode = RunProcessAndGetOutput(new string[] { "bash", "-c", "\"command", "-v", "dotnet\"" }, out dotnetPath); + int exitCode = RunProcessAndGetOutput(new string[] { "bash", "-c", "command -v dotnet" }, out dotnetPath); if (exitCode != 0) { Console.Error.WriteLine("'dotnet' command not found"); @@ -120,8 +120,11 @@ public void ValidateAssemblies() static int RunProcessAndGetOutput(string[] processAndArguments, out string standardOutput) { ProcessStartInfo startInfo = new ProcessStartInfo(); - startInfo.FileName = processAndArguments[0]; - startInfo.Arguments = string.Join(" ", processAndArguments.Skip(1)); + startInfo.FileName = processAndArguments[0]; + foreach (string arg in processAndArguments.Skip(1)) + { + startInfo.ArgumentList.Add(arg); + } startInfo.RedirectStandardOutput = true; using (Process p = Process.Start(startInfo)) diff --git a/distribution-packages/test.json b/distribution-packages/test.json index 6aa2b6d..18ce2bb 100644 --- a/distribution-packages/test.json +++ b/distribution-packages/test.json @@ -6,6 +6,7 @@ "type": "bash", "cleanup": true, "ignoredRIDs":[ - "rhel7" + "rhel7", + "linux-musl" ] } diff --git a/distribution-packages/test.sh b/distribution-packages/test.sh index f6b29d0..926e182 100755 --- a/distribution-packages/test.sh +++ b/distribution-packages/test.sh @@ -8,9 +8,6 @@ runtime_id=$(../runtime-id) # This might be the final/only netstandard version from now on netstandard_version=2.1 -# disabled for alpine -[ -z "${runtime_id##alpine*}" ] && { echo Disabled for Alpine; exit 0; } - ./test-standard-packages \ "${runtime_id}" \ "${runtime_version}" "${runtime_version}" \ diff --git a/liblttng-ust_sys-sdt.h/test.sh b/liblttng-ust_sys-sdt.h/test.sh index fcdc07a..da44ba5 100755 --- a/liblttng-ust_sys-sdt.h/test.sh +++ b/liblttng-ust_sys-sdt.h/test.sh @@ -6,7 +6,7 @@ set -x RUNTIME_ID=$(../runtime-id) set +e # disable abort-on-error so we can have the pipeline below fail case $RUNTIME_ID in - alpine*)packageName=$(apk list dotnet*lttng-ust);; + alpine*)packageName="" ;; *)packageName=$(rpm -qa | grep 'dotnet.*lttng-ust');; esac set -e @@ -16,22 +16,20 @@ if [[ -z "$packageName" ]]; then case $RUNTIME_ID in alpine*) packageName="lttng-ust" - ;; + ;; *) packageName=$(rpm -qa | grep 'lttng-ust') - ;; + ;; esac fi -# If a dotnet-specific lttng package doesn't exist, we must be using -# the normal system-wide lttng package. case $RUNTIME_ID in alpine*) filePath="/$(apk info -L "$packageName" | grep -E 'liblttng-ust.so.[01]$')" - ;; + ;; *) filePath=$(rpm -ql "$packageName" | grep -E 'liblttng-ust.so.[01]$') - ;; + ;; esac readelf -n "$filePath" | grep -F 'NT_STAPSDT (SystemTap probe descriptors)' diff --git a/omnisharp/test.json b/omnisharp/test.json index 1dfef1b..aad18bf 100644 --- a/omnisharp/test.json +++ b/omnisharp/test.json @@ -6,6 +6,7 @@ "type": "bash", "cleanup": true, "ignoredRIDs":[ + "linux-musl", "linux-s390x" ] } diff --git a/omnisharp/test.sh b/omnisharp/test.sh index 3bf73d7..fb7c95b 100755 --- a/omnisharp/test.sh +++ b/omnisharp/test.sh @@ -11,9 +11,6 @@ pushd workdir runtime_id="$(../../runtime-id --portable)" -# disabled for alpine -[ -z "${runtime_id##*musl*}" ] && { echo No musl release of omnisharp, disabled; exit 0; } - wget --no-verbose "https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-${runtime_id}.tar.gz" mkdir omnisharp diff --git a/runtime-id b/runtime-id index 6b21c33..5673bba 100755 --- a/runtime-id +++ b/runtime-id @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This is a script called by multiple tests to find the runtime id of # the current platform. @@ -38,14 +38,15 @@ while [[ $# -gt 0 ]]; do done if [[ ${portable_rid} == 1 ]]; then - case "${ID}" in - alpine)echo "linux-musl-${arch}" ;; - *) echo "linux-${arch}" ;; - esac + if (ldd --version 2>&1 || true) | grep -q musl ; then + echo "linux-musl-${arch}" + else + echo "linux-${arch}" + fi else case "${ID}" in - # Remove the RHEL minor version - rhel|alpine|rocky) rid_version=${VERSION_ID%.*} ;; + # Remove the minor version + alpine|ol|rhel|rocky) rid_version=${VERSION_ID%.*} ;; *) rid_version=${VERSION_ID} ;; esac diff --git a/template-test/test.sh b/template-test/test.sh index dc16698..2a4d02a 100755 --- a/template-test/test.sh +++ b/template-test/test.sh @@ -165,7 +165,7 @@ dotnet help > /dev/null 2>/dev/null readarray -t allAutoTemplates < <( dotnet new --list | - sed '0,/^------/d' | + sed '0,/^--*/d' | awk -F ' +' ' { print $2 }' | sed 's/,/\n/' | sed -e '/^ *$/d' |