]> git.cworth.org Git - fips/blob - test/fips-test
test: Add 4 tests using EGL and OpenGLESv2
[fips] / test / fips-test
1 #!/bin/sh
2
3 dir=$(dirname "$0")
4
5 tests=0
6 errors=0
7
8 test ()
9 {
10     script="$1"
11
12     tests=$((tests + 1))
13
14     if ./fips -v "${dir}/${script}" | grep -q "fips: terminating"; then
15         printf "PASS\n"
16     else
17         printf "FAIL\n"
18         errors=$((errors + 1))
19     fi
20 }
21
22 echo "Testing fips with programs using different window-system interfaces to"
23 echo "OpenGL, different linking mechanisms, and different symbol-lookup."
24 echo ""
25
26 printf "        Window sys.     Link-mode       Lookup\n"
27 printf "        -----------     -------------   -----------------\n"
28
29 printf "Testing GLX             link to libGL   direct calls            ... "
30 test glx-link-call
31
32 printf "Testing GLX             link to libGL   glXGetProcAddress       ... "
33 test glx-link-gpa
34
35 printf "Testing GLX             link to libGL   glXGetProcAddressARB    ... "
36 test glx-link-gpaa
37
38 printf "Testing GLX             dlopen(libGL)   dlsym                   ... "
39 test glx-dlopen-dlsym
40
41 printf "Testing GLX             dlopen(libGL)   glXGetProcAddress       ... "
42 test glx-dlopen-gpa
43
44 printf "Testing GLX             dlopen(libGL)   glXGetProcAddressARB    ... "
45 test glx-dlopen-gpaa
46
47 printf "Testing EGL/OpenGL      link to libGL   direct calls            ... "
48 test egl-opengl-link-call
49
50 printf "Testing EGL/OpenGL      link to libGL   eglGetProcAddress       ... "
51 test egl-opengl-link-gpa
52
53 printf "Testing EGL/OpenGL      dlopen(libGL)   dlsym                   ... "
54 test egl-opengl-dlopen-dlsym
55
56 printf "Testing EGL/OpenGL      dlopen(libGL)   eglGetProcAddress       ... "
57 test egl-opengl-dlopen-gpa
58
59 printf "Testing EGL/GLESv2      link libGLESv2  direct calls            ... "
60 test egl-glesv2-link-call
61
62 printf "Testing EGL/GLESv2      link libGLESv2  eglGetProcAddress       ... "
63 test egl-glesv2-link-gpa
64
65 printf "Testing EGL/GLESv2      dlopen(GLESv2)  dlsym                   ... "
66 test egl-glesv2-dlopen-dlsym
67
68 printf "Testing EGL/GLESv2      dlopen(GLESv2)  eglGetProcAddress       ... "
69 test egl-glesv2-dlopen-gpa
70
71 echo ""
72
73 if [ $errors -gt 0 ]; then
74     echo "Error: $errors/$tests tests failed."
75     exit 1
76 else
77     echo "All $tests tests passed."
78     exit 0
79 fi
80