Skip to content

Commit

Permalink
Update rest of the csproj files
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Aug 3, 2024
1 parent 86b37de commit 376ff48
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 45 deletions.
16 changes: 3 additions & 13 deletions src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,9 @@
<PropertyGroup>
<CLRTestBashPreCommands><![CDATA[
$(CLRTestBashPreCommands)
if [[ "$OSTYPE" == "darwin"* ]]; then
sysctl -a
sysctl -a | grep machdep.cpu.leaf7_features | grep AVX >/dev/null
if [ $? -ne 0 ]; then
echo No support for AVX, test not applicable.
exit 0
fi
fi
if [[ "$OSTYPE" == "linux"* ]]; then
if ! grep -q '^flags.*avx' /proc/cpuinfo 2>/dev/null; then
echo No support for AVX, test not applicable.
exit 0
fi
if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX__; then
echo No support for AVX, test not applicable.
exit 0
fi
]]></CLRTestBashPreCommands>
</PropertyGroup>
Expand Down
17 changes: 3 additions & 14 deletions src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Avx2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,9 @@
<PropertyGroup>
<CLRTestBashPreCommands><![CDATA[
$(CLRTestBashPreCommands)
if [[ "$OSTYPE" == "darwin"* ]]; then
sysctl -a
sysctl -a | grep machdep.cpu.leaf7_features | grep AVX2 >/dev/null
if [ $? -ne 0 ]; then
echo No support for AVX2, test not applicable.
exit 0
fi
fi
if [[ "$OSTYPE" == "linux"* ]]; then
if ! grep -q '^flags.*avx2' /proc/cpuinfo 2>/dev/null; then
echo No support for AVX2, test not applicable.
exit 0
fi
if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX2__; then
echo No support for AVX2, test not applicable.
exit 0
fi
]]></CLRTestBashPreCommands>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
<PropertyGroup>
<CLRTestBashPreCommands><![CDATA[
$(CLRTestBashPreCommands)
if [[ "$OSTYPE" == "linux"* ]]; then
if ! grep -q '^flags.*avx512' /proc/cpuinfo 2>/dev/null; then
echo No support for AVX512, test not applicable.
exit 0
fi
if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX512; then
echo No support for AVX512, test not applicable.
exit 0
fi
]]></CLRTestBashPreCommands>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,9 @@
<PropertyGroup>
<CLRTestBashPreCommands><![CDATA[
$(CLRTestBashPreCommands)
if [[ "$OSTYPE" == "darwin"* ]]; then
sysctl -a
sysctl -a | grep machdep.cpu.leaf7_features | grep AVX >/dev/null
if [ $? -ne 0 ]; then
echo No support for AVX, test not applicable.
exit 0
fi
fi
if [[ "$OSTYPE" == "linux"* ]]; then
if ! grep -q '^flags.*avx' /proc/cpuinfo 2>/dev/null; then
echo No support for AVX, test not applicable.
exit 0
fi
if ! cc -dM -E -march=native - < /dev/null 2>/dev/null | grep -q __AVX__; then
echo No support for AVX, test not applicable.
exit 0
fi
]]></CLRTestBashPreCommands>
</PropertyGroup>
Expand Down

0 comments on commit 376ff48

Please sign in to comment.