summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: 27036565621512877b04feed29e05e3c6684564e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Copyright (c) 2013, NVIDIA CORPORATION.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and/or associated documentation files (the
# "Materials"), to deal in the Materials without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Materials, and to
# permit persons to whom the Materials are furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# unaltered in all copies or substantial portions of the Materials.
# Any additions, deletions, or changes to the original source files
# must be clearly indicated in accompanying documentation.
#
# If only executable code is distributed, then the accompanying
# documentation must state that "this software is based in part on the
# work of the Khronos Group."
#
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

SUBDIRS = \
	GLX_dummy

noinst_HEADERS = test_utils.h

TESTS_ENVIRONMENT = \
	TOP_BUILDDIR=$(top_builddir) \
	ABS_TOP_BUILDDIR=$(abs_top_builddir)

TESTS = \
	init_test_env.sh \
	testglxgetprocaddress.sh \
	testglxmcbasic.sh \
	testglxmcloop.sh \
	testglxmcthreads.sh \
	testglxmclate.sh \
	testglxmcoldlink.sh \
	testglxgetclientstr.sh \
	testglxqueryversion.sh \
	testglxnscrthreads.sh \
	testpatchentrypoints.sh \
	fini_test_env.sh

# TODO: These tests depend on the x11glvnd server extension, which isn't used
# anymore. They need to be rewritten to use the GLX_EXT_libglvnd extension
# instead.
#TESTS += testx11glvndproto.sh
#TESTS += testglxnscreens.sh

EXTRA_DIST = $(TESTS)

check_PROGRAMS = \
	testglxgetprocaddress \
	testglxmakecurrent \
	testglxmakecurrent_oldlink \
	testglxgetclientstr \
	testglxqueryversion \
	testpatchentrypoints

#check_PROGRAMS += testx11glvndproto
#check_PROGRAMS += testglxnscreens

testglxnscreens_SOURCES = \
	$(top_srcdir)/src/util/glvnd_pthread.c \
	testglxnscreens.c \
	test_utils.c

#testglxnscreens_CFLAGS = -I$(top_srcdir)/$(X11GLVND_DIR) $(AM_CFLAGS)
#
#testglxnscreens_LDADD = -lX11
#testglxnscreens_LDADD += $(top_builddir)/src/GLX/libGLX.la
#testglxnscreens_LDADD += $(top_builddir)/src/OpenGL/libOpenGL.la
#testglxnscreens_LDADD += $(top_builddir)/src/util/trace/libtrace.la
#testglxnscreens_LDADD += -lX11 -ldl $(top_builddir)/$(X11GLVND_DIR)/libx11glvnd_client.la

# The *_oldlink variant tests that linking against legacy libGL.so works

TESTGLXMAKECURRENT_SOURCES_COMMON = \
	$(top_srcdir)/src/util/glvnd_pthread.c \
	testglxmakecurrent.c \
	test_utils.c

testglxmakecurrent_SOURCES = \
	$(TESTGLXMAKECURRENT_SOURCES_COMMON)

testglxmakecurrent_oldlink_SOURCES = \
	$(TESTGLXMAKECURRENT_SOURCES_COMMON)

testglxmakecurrent_oldlink_LDADD = -lX11 -ldl
testglxmakecurrent_oldlink_LDADD += $(top_builddir)/src/GL/libGL.la
testglxmakecurrent_oldlink_LDADD += $(top_builddir)/src/util/trace/libtrace.la

#testx11glvndproto_CFLAGS = -I$(top_srcdir)/$(X11GLVND_DIR)
#testx11glvndproto_LDADD = -lX11 $(top_builddir)/$(X11GLVND_DIR)/libx11glvnd_client.la

# Disable annoying "unused" errors
AM_CFLAGS =                                  \
	-Wno-error=unused-variable               \
	-Wno-error=unused-label                  \
	-I$(top_srcdir)/include                  \
	-I$(top_srcdir)/src/util                 \
	-I$(top_srcdir)/src/util/trace           \
	-I$(top_srcdir)/src/util/glvnd_pthread


testglxgetprocaddress_LDADD = -lX11
testglxgetprocaddress_LDADD += $(top_builddir)/src/GLX/libGLX.la

testglxmakecurrent_LDADD = -lX11 -ldl
testglxmakecurrent_LDADD += $(top_builddir)/src/GLX/libGLX.la
testglxmakecurrent_LDADD += $(top_builddir)/src/OpenGL/libOpenGL.la
testglxmakecurrent_LDADD += $(top_builddir)/src/util/trace/libtrace.la

testglxgetclientstr_LDADD = -lX11
testglxgetclientstr_LDADD += $(top_builddir)/src/GLX/libGLX.la
testglxgetclientstr_LDADD += $(top_builddir)/src/OpenGL/libOpenGL.la
testglxgetclientstr_LDADD += $(top_builddir)/src/util/trace/libtrace.la

testglxqueryversion_LDADD = -lX11
testglxqueryversion_LDADD += $(top_builddir)/src/GLX/libGLX.la
testglxqueryversion_LDADD += $(top_builddir)/src/OpenGL/libOpenGL.la
testglxqueryversion_LDADD += $(top_builddir)/src/util/trace/libtrace.la

testpatchentrypoints_SOURCES = \
	testpatchentrypoints.c \
	test_utils.c

testpatchentrypoints_LDADD = -lX11 -ldl
testpatchentrypoints_LDADD += $(top_builddir)/src/GLX/libGLX.la
testpatchentrypoints_LDADD += $(top_builddir)/src/OpenGL/libOpenGL.la
testpatchentrypoints_LDADD += $(top_builddir)/src/util/trace/libtrace.la