Skip to content

Commit 9c1fa19

Browse files
committed
Improve tests for alpine
- WIP
1 parent 5027c53 commit 9c1fa19

File tree

8 files changed

+23
-25
lines changed

8 files changed

+23
-25
lines changed

assemblies-valid/AssembliesValid.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class AssembliesValid
4444
public void ValidateAssemblies()
4545
{
4646
string dotnetPath = null;
47-
int exitCode = RunProcessAndGetOutput(new string[] { "bash", "-c", "\"command", "-v", "dotnet\"" }, out dotnetPath);
47+
int exitCode = RunProcessAndGetOutput(new string[] { "bash", "-c", "command -v dotnet" }, out dotnetPath);
4848
if (exitCode != 0)
4949
{
5050
Console.Error.WriteLine("'dotnet' command not found");
@@ -120,8 +120,11 @@ public void ValidateAssemblies()
120120
static int RunProcessAndGetOutput(string[] processAndArguments, out string standardOutput)
121121
{
122122
ProcessStartInfo startInfo = new ProcessStartInfo();
123-
startInfo.FileName = processAndArguments[0];
124-
startInfo.Arguments = string.Join(" ", processAndArguments.Skip(1));
123+
startInfo.FileName = processAndArguments[0];
124+
foreach (string arg in processAndArguments.Skip(1))
125+
{
126+
startInfo.ArgumentList.Add(arg);
127+
}
125128
startInfo.RedirectStandardOutput = true;
126129

127130
using (Process p = Process.Start(startInfo))

distribution-packages/test.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"type": "bash",
77
"cleanup": true,
88
"ignoredRIDs":[
9-
"rhel7"
9+
"rhel7",
10+
"linux-musl"
1011
]
1112
}

distribution-packages/test.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ runtime_id=$(../runtime-id)
88
# This might be the final/only netstandard version from now on
99
netstandard_version=2.1
1010

11-
# disabled for alpine
12-
[ -z "${runtime_id##alpine*}" ] && { echo Disabled for Alpine; exit 0; }
13-
1411
./test-standard-packages \
1512
"${runtime_id}" \
1613
"${runtime_version}" "${runtime_version}" \

liblttng-ust_sys-sdt.h/test.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -x
66
RUNTIME_ID=$(../runtime-id)
77
set +e # disable abort-on-error so we can have the pipeline below fail
88
case $RUNTIME_ID in
9-
alpine*)packageName=$(apk list dotnet*lttng-ust);;
9+
alpine*)packageName="" ;;
1010
*)packageName=$(rpm -qa | grep 'dotnet.*lttng-ust');;
1111
esac
1212
set -e
@@ -16,22 +16,20 @@ if [[ -z "$packageName" ]]; then
1616
case $RUNTIME_ID in
1717
alpine*)
1818
packageName="lttng-ust"
19-
;;
19+
;;
2020
*)
2121
packageName=$(rpm -qa | grep 'lttng-ust')
22-
;;
22+
;;
2323
esac
2424
fi
2525
26-
# If a dotnet-specific lttng package doesn't exist, we must be using
27-
# the normal system-wide lttng package.
2826
case $RUNTIME_ID in
2927
alpine*)
3028
filePath="/$(apk info -L "$packageName" | grep -E 'liblttng-ust.so.[01]$')"
31-
;;
29+
;;
3230
*)
3331
filePath=$(rpm -ql "$packageName" | grep -E 'liblttng-ust.so.[01]$')
34-
;;
32+
;;
3533
esac
3634
3735
readelf -n "$filePath" | grep -F 'NT_STAPSDT (SystemTap probe descriptors)'

omnisharp/test.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"type": "bash",
77
"cleanup": true,
88
"ignoredRIDs":[
9+
"linux-musl",
910
"linux-s390x"
1011
]
1112
}

omnisharp/test.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ pushd workdir
1111

1212
runtime_id="$(../../runtime-id --portable)"
1313

14-
# disabled for alpine
15-
[ -z "${runtime_id##*musl*}" ] && { echo No musl release of omnisharp, disabled; exit 0; }
16-
1714
wget --no-verbose "https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-${runtime_id}.tar.gz"
1815

1916
mkdir omnisharp

runtime-id

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This is a script called by multiple tests to find the runtime id of
44
# the current platform.
@@ -38,14 +38,15 @@ while [[ $# -gt 0 ]]; do
3838
done
3939

4040
if [[ ${portable_rid} == 1 ]]; then
41-
case "${ID}" in
42-
alpine)echo "linux-musl-${arch}" ;;
43-
*) echo "linux-${arch}" ;;
44-
esac
41+
if (ldd --version 2>&1 || true) | grep -q musl ; then
42+
echo "linux-musl-${arch}"
43+
else
44+
echo "linux-${arch}"
45+
fi
4546
else
4647
case "${ID}" in
47-
# Remove the RHEL minor version
48-
rhel|alpine|rocky) rid_version=${VERSION_ID%.*} ;;
48+
# Remove the minor version
49+
alpine|ol|rhel|rocky) rid_version=${VERSION_ID%.*} ;;
4950

5051
*) rid_version=${VERSION_ID} ;;
5152
esac

template-test/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ dotnet help > /dev/null 2>/dev/null
165165

166166
readarray -t allAutoTemplates < <(
167167
dotnet new --list |
168-
sed '0,/^------/d' |
168+
sed '0,/^--*/d' |
169169
awk -F ' +' ' { print $2 }' |
170170
sed 's/,/\n/' |
171171
sed -e '/^ *$/d' |

0 commit comments

Comments
 (0)