Added test-vsx script
authorSadoon Albader <sadoon@soulserv.xyz>
Wed, 23 Aug 2023 18:11:06 +0000 (21:11 +0300)
committerSadoon Albader <sadoon@soulserv.xyz>
Wed, 23 Aug 2023 18:11:06 +0000 (21:11 +0300)
test-vsx [new file with mode: 0755]

diff --git a/test-vsx b/test-vsx
new file mode 100755 (executable)
index 0000000..bc816e7
--- /dev/null
+++ b/test-vsx
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+echo "SCRIPT IS STILL WIP, DO NOT RUN"
+
+CHROOT=/opt/chroot/gentoo-sffs
+CHROOT=/mnt/mntpoint2
+BINDIRS=($CHROOT/bin $CHROOT/sbin $CHROOT/usr/libexec)
+
+failed=false
+
+for dir in $BINDIRS
+do
+    for bin in $(ls -1 $dir)
+    do
+        if $(fgrep -qof VSX_INSNS.txt $dir/$bin | sort | uniq -c | awk '{print $2 " " $1}'); then
+            echo "VSX instructions found in $bin"
+            failed=true
+        fi
+    done
+done
+
+
+
+if $failed; then
+    echo "Test failed"
+else
+    echo "Test succeeded!"
+fi