Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ black~=25.1.0
flynt~=1.0
pytest
pytest-xdist
py-cpuinfo
22 changes: 2 additions & 20 deletions dev_tools/test_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,10 @@ if [[ "$1" == "-h" || "$1" == "--help" || "$1" == "help" ]]; then
exit 0
fi

declare features=""
shopt -s nocasematch
# Note: can't use Bash $OSTYPE var here b/c the value is "linux-gnu" on Win 10.
case "$(uname -s)" in
darwin*)
features=$(sysctl machdep.cpu.features)
;;
linux*)
features=$(grep -m1 -i "^flags" /proc/cpuinfo)
;;
windows*|cygwin*|mingw32*|msys*|mingw*)
features=$(wmic cpu get Caption,InstructionSet /value 2>/dev/null)
;;
*)
echo "Unsupported OS: $(uname -s)"
exit 1
;;
esac
shopt -u nocasematch

# Unless we can tell this system supports AVX, we skip those tests.
declare features=""
declare filters=""
features="$(python -c 'import cpuinfo; print(" ".join(cpuinfo.get_cpu_info().get("flags", [])))')"
[[ "$features" == *avx2* ]] || filters+=",-avx"
[[ "$features" == *sse* ]] || filters+=",-sse"
filters="${filters#,}"
Expand Down
Loading