Commit graph

3 commits

Author SHA1 Message Date
Kyle Brenneman 82413e05ff Use sh instead of bash for the test scripts.
Not all systems have bash available, and in those that do, we can't assume that
it's located at /bin/bash.
2018-03-26 14:41:05 -06:00
Kyle Brenneman fa6a74c03b tests: Some minor cleanup
Added a separate script glxenv.sh for the common environment variables used by
the other GLX tests.

Removed the testx11glvndproto and testglxnscreens tests, since both of them
depend on the x11glvnd X extension, which is no longer used.

Removed the unused GLX_dummy_copy stuff from the GLX_dummy makefile. Also
removed the COMMON_* variables, since they're only ever used once each.
2016-10-17 11:12:21 -06:00
Brian Nguyen 808706d3a2 [tests] Add make current subtests
This implements a test app, testglxmakecurrent, which verifies the
correctness of the API library's GL dispatching when a vendor's context
is current in one or more threads.

This test spawns a given number of threads each with their own separate
context and window, and has each thread make current to its given
context. The thread then calls some core GL functions and
(to-be-implemented) a GL extension function, glMakeCurrentTestResults(),
which returns the number of times each core GL function was called.
The test then compares glMakeCurrentTestResults()'s result (which should
match up with the vendor library's call count) to the application's call
count and fails if there is a mismatch.

The test is designed to only require pthreads if multiple threads are
used. This verifies that the API library's single-threaded fake pthread
wrapper functions work properly.

Add testglxmc{basic,late,loop,threads}.sh scripts, which run the
testglxmakecurrent test with different arguments for ordering of
glXGetProcAddress(), number of threads, and number of iterations.

Isolate helper functions for window creation/destruction to a separate
test_utils.c source file which will be used by later tests.
2013-08-26 11:03:43 -07:00