mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-28 00:45:34 -04:00
* Introduced new tests directory.
* added old serialiser tests (FAIL at the moment). * moved Makefile scripts to tests diectory. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3173 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
69bba330ac
commit
9c6a3a7781
19 changed files with 2061 additions and 2 deletions
25
libretroshare/src/tests/scripts/checks.mk
Normal file
25
libretroshare/src/tests/scripts/checks.mk
Normal file
|
@ -0,0 +1,25 @@
|
|||
#Basic checks
|
||||
|
||||
ifndef RS_TOP_DIR
|
||||
dummy:
|
||||
echo "RS_TOP_DIR is not defined in your makefile"
|
||||
endif
|
||||
|
||||
#ifndef SSL_DIR
|
||||
#dummy:
|
||||
# echo "you must define SSL_DIR before you can compile"
|
||||
#
|
||||
#endif
|
||||
|
||||
ifneq ($(OS),Linux)
|
||||
ifneq ($(OS),MacOSX)
|
||||
ifndef PTHREADS_DIR
|
||||
dummy:
|
||||
echo "you must define PTHREADS_DIR before you can compile"
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
118
libretroshare/src/tests/scripts/config-cygwin.mk
Normal file
118
libretroshare/src/tests/scripts/config-cygwin.mk
Normal file
|
@ -0,0 +1,118 @@
|
|||
ifneq ($(OS),Cygwin)
|
||||
dummy:
|
||||
echo "ERROR Cygwin configuration file included, but (OS != Cygwin)
|
||||
|
||||
endif
|
||||
|
||||
############ LINUX CONFIGURATION ########################
|
||||
|
||||
# flags for components....
|
||||
PQI_USE_XPGP = 1
|
||||
#PQI_USE_PROXY = 1
|
||||
#PQI_USE_CHANNELS = 1
|
||||
#USE_FILELOOK = 1
|
||||
|
||||
###########################################################################
|
||||
|
||||
#### DrBobs Versions.... Please Don't Delete.
|
||||
### Comment out if needed.
|
||||
ALT_SRC_ROOT=/cygdrive/c/home/rmfern/prog/MinGW
|
||||
SRC_ROOT=../../../..
|
||||
|
||||
PTHREADS_DIR=$(ALT_SRC_ROOT)/pthreads/pthreads.2
|
||||
|
||||
###################
|
||||
|
||||
#ALT_SRC_ROOT=/cygdrive/c/RetroShareBuild/src
|
||||
#SRC_ROOT=/cygdrive/c/RetroShareBuild/src
|
||||
|
||||
#PTHREADS_DIR=$(ALT_SRC_ROOT)/pthreads-w32-2-8-0-release
|
||||
|
||||
###################
|
||||
|
||||
ZLIB_DIR=$(ALT_SRC_ROOT)/zlib-1.2.3
|
||||
|
||||
SSL_DIR=$(SRC_ROOT)/openssl-0.9.7g-xpgp-0.1c
|
||||
UPNPC_DIR=$(SRC_ROOT)/miniupnpc-1.0
|
||||
|
||||
include $(RS_TOP_DIR)/scripts/checks.mk
|
||||
|
||||
############ ENFORCE DIRECTORY NAMING ########################
|
||||
|
||||
CC = g++
|
||||
RM = /bin/rm
|
||||
RANLIB = ranlib
|
||||
LIBDIR = $(RS_TOP_DIR)/lib
|
||||
LIBRS = $(LIBDIR)/libretroshare.a
|
||||
|
||||
# Unix: Linux/Cygwin
|
||||
INCLUDE = -I $(RS_TOP_DIR)
|
||||
|
||||
ifdef PQI_DEBUG
|
||||
CFLAGS = -Wall -g $(INCLUDE)
|
||||
else
|
||||
CFLAGS = -Wall -O2 $(INCLUDE)
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_XPGP
|
||||
INCLUDE += -I $(SSL_DIR)/include
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_XPGP
|
||||
CFLAGS += -DPQI_USE_XPGP
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_PROXY
|
||||
CFLAGS += -DPQI_USE_PROXY
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_CHANNELS
|
||||
CFLAGS += -DPQI_USE_CHANNELS
|
||||
endif
|
||||
|
||||
ifdef USE_FILELOOK
|
||||
CFLAGS += -DUSE_FILELOOK
|
||||
endif
|
||||
|
||||
|
||||
RSCFLAGS = -Wall -g $(INCLUDE)
|
||||
|
||||
#########################################################################
|
||||
# OS Compile Options
|
||||
#########################################################################
|
||||
|
||||
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
|
||||
BIOCC = gcc
|
||||
|
||||
# Cygwin - ?same? as Linux flags
|
||||
BIOCFLAGS = -I $(SSL_DIR)/include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
|
||||
|
||||
#########################################################################
|
||||
# OS specific Linking.
|
||||
#########################################################################
|
||||
|
||||
# for static pthread libs....
|
||||
WININC += -DPTW32_STATIC_LIB
|
||||
WININC += -mno-cygwin -mwindows -fno-exceptions
|
||||
WININC += -DWINDOWS_SYS
|
||||
|
||||
WINLIB = -lws2_32 -luuid -lole32 -liphlpapi
|
||||
WINLIB += -lcrypt32 -lwinmm
|
||||
|
||||
CFLAGS += -I$(PTHREADS_DIR) $(WININC)
|
||||
CFLAGS += -I$(ZLIB_DIR)
|
||||
|
||||
LIBS = -L$(LIBDIR) -lretroshare
|
||||
ifdef PQI_USE_XPGP
|
||||
LIBS += -L$(SSL_DIR)
|
||||
endif
|
||||
|
||||
LIBS += -lssl -lcrypto
|
||||
LIBS += -L$(UPNPC_DIR) -lminiupnpc
|
||||
LIBS += -L$(ZLIB_DIR) -lz
|
||||
LIBS += -L$(PTHREADS_DIR) -lpthreadGC2d
|
||||
LIBS += $(WINLIB)
|
||||
|
||||
RSCFLAGS += $(WININC)
|
||||
|
||||
|
70
libretroshare/src/tests/scripts/config-linux.mk
Normal file
70
libretroshare/src/tests/scripts/config-linux.mk
Normal file
|
@ -0,0 +1,70 @@
|
|||
|
||||
ifneq ($(OS),Linux)
|
||||
dummy:
|
||||
echo "ERROR Linux configuration file included, but (OS != Linux)
|
||||
|
||||
endif
|
||||
|
||||
############ LINUX CONFIGURATION ########################
|
||||
|
||||
#UPNPC_DIR=../../../../miniupnpc-1.0
|
||||
|
||||
# Need to define miniupnpc version because API changed a little between v1.0 and 1.2
|
||||
# put 10 for 1.0 and 12 for 1.2
|
||||
#DEFINES += -DMINIUPNPC_VERSION=10
|
||||
|
||||
include $(RS_TOP_DIR)/tests/scripts/checks.mk
|
||||
|
||||
############ ENFORCE DIRECTORY NAMING ########################
|
||||
|
||||
CC = g++
|
||||
RM = /bin/rm
|
||||
RANLIB = ranlib
|
||||
LIBDIR = $(RS_TOP_DIR)/lib
|
||||
LIBRS = $(LIBDIR)/libretroshare.a
|
||||
|
||||
# Unix: Linux/Cygwin
|
||||
INCLUDE = -I $(RS_TOP_DIR)
|
||||
CFLAGS = -Wall -g $(INCLUDE)
|
||||
CFLAGS += ${DEFINES}
|
||||
|
||||
#ifdef PQI_USE_XPGP
|
||||
# INCLUDE += -I $(SSL_DIR)/include
|
||||
#endif
|
||||
#
|
||||
#ifdef PQI_USE_XPGP
|
||||
# CFLAGS += -DPQI_USE_XPGP
|
||||
#endif
|
||||
|
||||
RSCFLAGS = -Wall -g $(INCLUDE)
|
||||
#########################################################################
|
||||
# OS Compile Options
|
||||
#########################################################################
|
||||
|
||||
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
|
||||
BIOCC = gcc
|
||||
|
||||
# march=i686 causes problems while 64Bit compiling, GCC tries to generate Output for a m64 machine, but the marchi686
|
||||
# doesnt allow the instructionfs for that.
|
||||
#
|
||||
# gcc docu: http://gcc.gnu.org/onlinedocs/gcc-4.0.3/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options
|
||||
|
||||
# Linux flags
|
||||
BIOCFLAGS = -I $(SSL_DIR)/include ${DEFINES} -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
|
||||
|
||||
#########################################################################
|
||||
# OS specific Linking.
|
||||
#########################################################################
|
||||
|
||||
LIBS = -L$(LIBDIR) -lretroshare
|
||||
ifdef PQI_USE_XPGP
|
||||
LIBS += -L$(SSL_DIR)
|
||||
endif
|
||||
LIBS += -lssl -lcrypto -lpthread
|
||||
#LIBS += -L$(UPNPC_DIR) -lminiupnpc
|
||||
LIBS += $(XLIB) -ldl -lz
|
||||
LIBS += -lgpgme
|
||||
|
||||
RSLIBS = $(LIBS)
|
||||
|
||||
|
152
libretroshare/src/tests/scripts/config-macosx.mk
Normal file
152
libretroshare/src/tests/scripts/config-macosx.mk
Normal file
|
@ -0,0 +1,152 @@
|
|||
|
||||
ifneq ($(OS),MacOSX)
|
||||
dummy:
|
||||
echo "ERROR MacOSX configuration file included, but (OS != MacOSX)
|
||||
|
||||
endif
|
||||
|
||||
############ LINUX CONFIGURATION ########################
|
||||
|
||||
|
||||
# FLAGS to decide if we want i386 Build or ppc Build
|
||||
#
|
||||
#
|
||||
|
||||
# PPC is default
|
||||
# Could define both for combined compilation...
|
||||
# except might not work for bio_tou.c file!
|
||||
#
|
||||
# MAC_I386_BUILD = 1
|
||||
# MAC_PPC_BUILD = 1
|
||||
|
||||
#MAC_I386_BUILD = 1
|
||||
#MAC_PPC_BUILD = 1
|
||||
|
||||
ifndef MAC_I386_BUILD
|
||||
MAC_PPC_BUILD = 1
|
||||
endif
|
||||
|
||||
# flags for components....
|
||||
#PQI_USE_SSLONLY = 1
|
||||
#PQI_USE_XPGP = 1
|
||||
|
||||
#PQI_USE_PROXY = 1
|
||||
#PQI_USE_CHANNELS = 1
|
||||
#USE_FILELOOK = 1
|
||||
|
||||
SSL_DIR=../../../../../src/openssl-0.9.7g-xpgp-0.1c
|
||||
UPNPC_DIR=../../../../../src/miniupnpc-1.0
|
||||
|
||||
include $(RS_TOP_DIR)/scripts/checks.mk
|
||||
|
||||
############ ENFORCE DIRECTORY NAMING ########################
|
||||
|
||||
CC = g++
|
||||
RM = /bin/rm
|
||||
|
||||
RANLIB = ranlib
|
||||
|
||||
# Dummy ranlib -> can't do it until afterwards with universal binaries.
|
||||
# RANLIB = ls -l
|
||||
|
||||
LIBDIR = $(RS_TOP_DIR)/lib
|
||||
LIBRS = $(LIBDIR)/libretroshare.a
|
||||
|
||||
OPT_DIR = /opt/local
|
||||
OPT_INCLUDE = $(OPT_DIR)/include
|
||||
OPT_LIBS = $(OPT_DIR)/lib
|
||||
|
||||
INCLUDE = -I $(RS_TOP_DIR) -I $(OPT_INCLUDE)
|
||||
#CFLAGS = -Wall -O3
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
# Flags for architecture builds.
|
||||
ifdef MAC_I386_BUILD
|
||||
CFLAGS += -arch i386
|
||||
endif
|
||||
|
||||
ifdef MAC_PPC_BUILD
|
||||
CFLAGS += -arch ppc
|
||||
endif
|
||||
|
||||
CFLAGS += $(INCLUDE)
|
||||
|
||||
# This Line is for Universal BUILD for 10.4 + 10.5
|
||||
# (but unlikely to work unless Qt Libraries are build properly)
|
||||
# CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
||||
|
||||
ifdef PQI_USE_XPGP
|
||||
INCLUDE += -I $(SSL_DIR)/include
|
||||
CFLAGS += -DPQI_USE_XPGP
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_SSLONLY
|
||||
CFLAGS += -DPQI_USE_SSLONLY
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_PROXY
|
||||
CFLAGS += -DPQI_USE_PROXY
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_CHANNELS
|
||||
CFLAGS += -DPQI_USE_CHANNELS
|
||||
endif
|
||||
|
||||
ifdef USE_FILELOOK
|
||||
CFLAGS += -DUSE_FILELOOK
|
||||
endif
|
||||
|
||||
|
||||
# RSCFLAGS = -Wall -O3 $(INCLUDE)
|
||||
|
||||
#########################################################################
|
||||
# OS Compile Options
|
||||
#########################################################################
|
||||
|
||||
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
|
||||
BIOCC = gcc
|
||||
|
||||
|
||||
# Flags for architecture builds.
|
||||
ifdef MAC_I386_BUILD
|
||||
BIOCFLAGS = -arch i386 -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common
|
||||
endif
|
||||
|
||||
ifdef MAC_PPC_BUILD
|
||||
BIOCFLAGS = -arch ppc -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# MacOSX flags
|
||||
# BIOCFLAGS = -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
|
||||
|
||||
# This is for the Universal Build...
|
||||
# but is unlikely to work... as options are PPC specific....
|
||||
#
|
||||
# BIOCFLAGS = -arch ppc -arch i386 -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
|
||||
|
||||
|
||||
#########################################################################
|
||||
# OS specific Linking.
|
||||
#########################################################################
|
||||
|
||||
LIBS = -Wl,-search_paths_first
|
||||
|
||||
# for Univeral BUILD
|
||||
# LIBS += -arch ppc -arch i386
|
||||
# LIBS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
|
||||
|
||||
LIBS += -L$(LIBDIR) -lretroshare
|
||||
ifdef PQI_USE_XPGP
|
||||
LIBS += -L$(SSL_DIR)
|
||||
endif
|
||||
LIBS += -lssl -lcrypto -lpthread
|
||||
LIBS += -L$(OPT_LIBS)
|
||||
LIBS += -lgpgme -lgpg-error
|
||||
LIBS += -L$(UPNPC_DIR) -lminiupnpc
|
||||
LIBS += $(XLIB) -ldl -lz
|
||||
|
||||
RSLIBS = $(LIBS)
|
||||
|
||||
|
138
libretroshare/src/tests/scripts/config-mingw.mk
Normal file
138
libretroshare/src/tests/scripts/config-mingw.mk
Normal file
|
@ -0,0 +1,138 @@
|
|||
#ifneq ($(OS),"Win ")
|
||||
#dummy:
|
||||
# echo "ERROR OS = $(OS)"
|
||||
# echo "ERROR MinGW configuration file included, but (OS != Win)
|
||||
#
|
||||
#endif
|
||||
|
||||
############ LINUX CONFIGURATION ########################
|
||||
|
||||
# flags for components....
|
||||
#PQI_USE_XPGP = 1
|
||||
#PQI_USE_PROXY = 1
|
||||
#PQI_USE_CHANNELS = 1
|
||||
#USE_FILELOOK = 1
|
||||
|
||||
###########################################################################
|
||||
|
||||
#### DrBobs Versions.... Please Don't Delete.
|
||||
### Comment out if needed.
|
||||
SRC_ROOT_PKG=/home/Mark/prog/retroshare/package/rs-win-v0.5.0/src
|
||||
SRC_ROOT_GPG=/local
|
||||
|
||||
#ALT_SRC_ROOT=/cygdrive/c/home/rmfern/prog/MinGW
|
||||
#SRC_ROOT=../../../..
|
||||
|
||||
PTHREADS_DIR=$(SRC_ROOT_PKG)/pthreads-w32-2-8-0/Pre-built.2
|
||||
ZLIB_DIR=$(SRC_ROOT_PKG)/zlib-1.2.3
|
||||
SSL_DIR=$(SRC_ROOT_PKG)/openssl-tmp
|
||||
UPNPC_DIR=$(SRC_ROOT_PKG)/miniupnpc-1.3
|
||||
|
||||
###########################################################################
|
||||
|
||||
#### Enable this section for compiling with MSYS/MINGW compile
|
||||
#SRC_ROOT=/home/linux
|
||||
|
||||
#SSL_DIR=$(SRC_ROOT)/OpenSSL
|
||||
#GPGME_DIR=$(SRC_ROOT)/gpgme-1.1.8
|
||||
#GPG_ERROR_DIR=$(SRC_ROOT)/libgpg-error-1.7
|
||||
|
||||
#ZLIB_DIR=$(SRC_ROOT)/zlib-1.2.3
|
||||
#UPNPC_DIR=$(SRC_ROOT)/miniupnpc-1.0
|
||||
#PTHREADS_DIR=$(SRC_ROOT)/pthreads-w32-2-8-0-release
|
||||
|
||||
include $(RS_TOP_DIR)/scripts/checks.mk
|
||||
|
||||
############ ENFORCE DIRECTORY NAMING #######################################
|
||||
|
||||
CC = g++
|
||||
RM = /bin/rm
|
||||
RANLIB = ranlib
|
||||
LIBDIR = $(RS_TOP_DIR)/lib
|
||||
LIBRS = $(LIBDIR)/libretroshare.a
|
||||
|
||||
# Unix: Linux/Cygwin
|
||||
INCLUDE = -I $(RS_TOP_DIR)
|
||||
|
||||
ifdef PQI_DEBUG
|
||||
CFLAGS = -Wall -g $(INCLUDE)
|
||||
else
|
||||
CFLAGS = -Wall -O2 $(INCLUDE)
|
||||
endif
|
||||
|
||||
# These aren't used anymore.... really.
|
||||
ifdef PQI_USE_XPGP
|
||||
CFLAGS += -DPQI_USE_XPGP
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_PROXY
|
||||
CFLAGS += -DPQI_USE_PROXY
|
||||
endif
|
||||
|
||||
ifdef PQI_USE_CHANNELS
|
||||
CFLAGS += -DPQI_USE_CHANNELS
|
||||
endif
|
||||
|
||||
ifdef USE_FILELOOK
|
||||
CFLAGS += -DUSE_FILELOOK
|
||||
endif
|
||||
|
||||
|
||||
# SSL / pthreads / Zlib
|
||||
# included by default for Windows compilation.
|
||||
INCLUDE += -I $(SSL_DIR)/include
|
||||
INCLUDE += -I$(PTHREADS_DIR)
|
||||
INCLUDE += -I$(ZLIB_DIR)
|
||||
|
||||
|
||||
#########################################################################
|
||||
# OS Compile Options
|
||||
#########################################################################
|
||||
|
||||
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
|
||||
BIOCC = gcc
|
||||
|
||||
# Cygwin - ?same? as Linux flags
|
||||
BIOCFLAGS = -I $(SSL_DIR)/include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
|
||||
BIOCFLAGS += -DWINDOWS_SYS
|
||||
|
||||
#########################################################################
|
||||
# OS specific Linking.
|
||||
#########################################################################
|
||||
|
||||
# for static pthread libs....
|
||||
#WININC += -DPTW32_STATIC_LIB
|
||||
#WININC += -mno-cygwin -mwindows -fno-exceptions
|
||||
|
||||
WININC += -DWINDOWS_SYS
|
||||
|
||||
WINLIB = -lws2_32 -luuid -lole32 -liphlpapi
|
||||
WINLIB += -lcrypt32 -lwinmm
|
||||
|
||||
CFLAGS += -I$(SSL_DIR)/include
|
||||
CFLAGS += -I$(PTHREADS_DIR)/include
|
||||
CFLAGS += -I$(ZLIB_DIR)
|
||||
CFLAGS += -I$(SRC_ROOT_GPG)/include
|
||||
|
||||
### Enable this for GPGME and GPG ERROR dirs
|
||||
#CFLAGS += -I$(GPGME_DIR)/src
|
||||
#CFLAGS += -I$(GPG_ERROR_DIR)/src
|
||||
|
||||
CFLAGS += $(WININC)
|
||||
|
||||
|
||||
|
||||
LIBS = -L$(LIBDIR) -lretroshare
|
||||
|
||||
LIBS += -L$(SSL_DIR)
|
||||
|
||||
LIBS += -lssl -lcrypto
|
||||
LIBS += -L$(UPNPC_DIR) -lminiupnpc
|
||||
LIBS += -L$(ZLIB_DIR) -lz
|
||||
LIBS += -L$(PTHREADS_DIR) -lpthreadGC2d
|
||||
LIBS += $(WINLIB)
|
||||
|
||||
#RSCFLAGS = -Wall -g $(INCLUDE)
|
||||
#RSCFLAGS += $(WININC)
|
||||
|
||||
|
27
libretroshare/src/tests/scripts/config.mk
Normal file
27
libretroshare/src/tests/scripts/config.mk
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
# determine which operating system
|
||||
#
|
||||
###########################################################################
|
||||
#Define OS.
|
||||
#
|
||||
OS = Linux
|
||||
#OS = MacOSX
|
||||
#OS = Cygwin
|
||||
#OS = Win # MinGw.
|
||||
###########################################################################
|
||||
|
||||
ifeq ($(OS),Linux)
|
||||
include $(RS_TOP_DIR)/tests/scripts/config-linux.mk
|
||||
else
|
||||
ifeq ($(OS),MacOSX)
|
||||
include $(RS_TOP_DIR)/tests/scripts/config-macosx.mk
|
||||
else
|
||||
ifeq ($(OS),Cygwin)
|
||||
include $(RS_TOP_DIR)/tests/scripts/config-cygwin.mk
|
||||
else
|
||||
include $(RS_TOP_DIR)/tests/scripts/config-mingw.mk
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
###########################################################################
|
25
libretroshare/src/tests/scripts/regress.mk
Normal file
25
libretroshare/src/tests/scripts/regress.mk
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
testoutputfiles = $(foreach tt,$(1),$(tt).tstout)
|
||||
|
||||
%.tstout : %.sh
|
||||
-sh ./$< > $@ 2>&1
|
||||
|
||||
%.tstout : %
|
||||
-./$< > $@ 2>&1
|
||||
|
||||
TESTOUT = $(call testoutputfiles,$(TESTS))
|
||||
|
||||
.phony : tests regress retest clobber
|
||||
|
||||
tests: $(TESTS)
|
||||
|
||||
regress: $(TESTOUT)
|
||||
@-echo "--------------- SUCCESS (count):"
|
||||
@-grep -c SUCCESS $(TESTOUT)
|
||||
@-echo "--------------- FAILURE REPORTS:"
|
||||
@-grep FAILURE $(TESTOUT) || echo no failures
|
||||
@-echo "--------------- end"
|
||||
|
||||
retest:
|
||||
-/bin/rm $(TESTOUT)
|
||||
|
23
libretroshare/src/tests/scripts/rules.mk
Normal file
23
libretroshare/src/tests/scripts/rules.mk
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
# defines required / used.
|
||||
#
|
||||
# CFLAGS
|
||||
#
|
||||
#
|
||||
|
||||
librs: $(RSOBJ)
|
||||
$(AR) r $(LIBRS) $(RSOBJ)
|
||||
$(RANLIB) $(LIBRS)
|
||||
|
||||
.cc.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
clean:
|
||||
-/bin/rm $(RSOBJ) $(EXECOBJ) $(TESTOBJ)
|
||||
|
||||
clobber: clean retest
|
||||
-/bin/rm $(EXEC) $(TESTS)
|
||||
|
||||
|
||||
include $(RS_TOP_DIR)/tests/scripts/regress.mk
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue