Adding self-contained tests to be built during make all

This commit is contained in:
Alexandre Quesnel 2021-02-27 20:58:05 +00:00
parent 5810cd9fe9
commit ec52c6466d
10 changed files with 39 additions and 29 deletions

5
.gitignore vendored
View File

@ -22,6 +22,7 @@ keygen/xrdp-keygen
.libs
libtool
*.lo
*.log
ltmain.sh
Makefile
Makefile.in
@ -41,6 +42,10 @@ sesman/xrdp-sesman
sesman/sesman.ini
*.so
stamp-h1
test-driver
tests/memtest/memtest
tests/tcp_proxy/tcp_proxy
*.trs
xrdp/xrdp
xrdp/xrdp.ini
xrdp_configure_options.h

View File

@ -20,7 +20,6 @@ EXTRA_DIST = \
m4 \
postinstall-pak \
tcutils \
tests \
vrplayer
if XRDP_NEUTRINORDP
@ -64,7 +63,8 @@ SUBDIRS = \
genkeymap \
xrdpapi \
pkgconfig \
$(XRDPVRDIR)
$(XRDPVRDIR) \
tests
distclean-local:
-rm -f xrdp_configure_options.h

View File

@ -397,6 +397,9 @@ AC_CONFIG_FILES([
sesman/libscp/Makefile
sesman/Makefile
sesman/tools/Makefile
tests/Makefile
tests/memtest/Makefile
tests/tcp_proxy/Makefile
vnc/Makefile
xrdpapi/Makefile
xrdp/Makefile

1
tests/.gitignore vendored
View File

@ -1 +0,0 @@
!Makefile

8
tests/Makefile.am Normal file
View File

@ -0,0 +1,8 @@
EXTRA_DIST = \
gtcp_proxy \
readme.txt
SUBDIRS = \
memtest \
tcp_proxy

View File

@ -1,13 +0,0 @@
OBJS = libmem.o memtest.o
#CFLAGS = -O2 -Wall
CFLAGS = -g
all: memtest
memtest: $(OBJS)
$(CC) -o memtest $(OBJS)
clean:
rm -f $(OBJS) librdp.a

11
tests/memtest/Makefile.am Normal file
View File

@ -0,0 +1,11 @@
sbin_PROGRAMS = \
memtest
memtest_SOURCES = \
libmem.h \
libmem.c \
memtest.c
TESTS = \
memtest

View File

@ -2,6 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "libmem.h"

View File

@ -1,13 +0,0 @@
CFLAGS = -O2 -Wall
LDFLAGS =
OBJS = main.o
LIBS = -ldl
all: tcp_proxy
tcp_proxy: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o tcp_proxy $(OBJS) $(LIBS)
.PHONY clean:
rm -f $(OBJS) tcp_proxy

View File

@ -0,0 +1,9 @@
sbin_PROGRAMS = \
tcp_proxy
tcp_proxy_SOURCES = \
main.c
tcp_proxy_LDADD = \
-ldl