X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2Ffips-test;fp=test%2Ffips-test;h=cada79b9fe85de85a98f0a78e7192397f159f19d;hb=18a600531c73bfd36f9d8d0814ee6d22d1456d67;hp=0000000000000000000000000000000000000000;hpb=02c39fbdaa29d62a8e7b8d223f62ccd08d4782ee;p=fips diff --git a/test/fips-test b/test/fips-test new file mode 100755 index 0000000..cada79b --- /dev/null +++ b/test/fips-test @@ -0,0 +1,41 @@ +#!/bin/sh + +dir=$(dirname "$0") + +tests=0 +errors=0 + +test () +{ + script="$1" + + tests=$((tests + 1)) + + if ./fips -v "${dir}/${script}" | grep -q "fips: terminating"; then + printf "PASS\n" + else + printf "FAIL\n" + errors=$((errors + 1)) + fi +} + +echo "Testing fips with programs using different window-system interfaces to" +echo "OpenGL, different linking mechanisms, and different symbol-lookup." +echo "" + +printf " Win-sys Link-mode Lookup\n" +printf " ------- ------------- ------------\n" + +printf "Testing GLX link to libGL direct calls ... " +test glx-link-call + +echo "" + +if [ $errors -gt 0 ]; then + echo "Error: $errors/$tests tests failed." + exit 1 +else + echo "All $tests tests passed." + exit 0 +fi +