--- /dev/null
+#!/bin/sh
+
+FIPS_TEST_DIR=/home/cworth/src/fips/test
+
+if [ ! -d ${FIPS_TEST_DIR} ] ; then
+ echo "Failed to find fips test suite at: ${FIPS_TEST_DIR}"
+ echo "Please download fips and update this script to point to its test directory."
+ exit 1
+fi
+
+tests=0
+errors=0
+
+test ()
+{
+ script="$1"
+
+ tests=$((tests + 1))
+
+ if ${FIPS_TEST_DIR}/${script} | grep -q "^glfps"; then
+ printf "PASS\n"
+ else
+ printf "FAIL\n"
+ errors=$((errors + 1))
+ fi
+}
+
+echo "Testing glfps with programs using different window-system interfaces to"
+echo "OpenGL, different linking mechanisms, and different symbol-lookup."
+echo ""
+
+export LD_PRELOAD=./libglfps.so
+
+printf " Window sys. Link-mode Lookup\n"
+printf " ----------- ------------- -----------------\n"
+
+printf "Testing GLX link to libGL direct calls ... "
+test glx-link-call
+
+printf "Testing GLX link to libGL glXGetProcAddress ... "
+test glx-link-gpa
+
+printf "Testing GLX link to libGL glXGetProcAddressARB ... "
+test glx-link-gpaa
+
+printf "Testing GLX dlopen(libGL) dlsym ... "
+test glx-dlopen-dlsym
+
+printf "Testing GLX dlopen(libGL) glXGetProcAddress ... "
+test glx-dlopen-gpa
+
+printf "Testing GLX dlopen(libGL) glXGetProcAddressARB ... "
+test glx-dlopen-gpaa
+
+echo ""
+
+if [ $errors -gt 0 ]; then
+ echo "Error: $errors/$tests tests failed."
+ exit 1
+else
+ echo "All $tests tests passed."
+ exit 0
+fi
+