forked from Mirrors/wine-wine
Added rules for running tests.
parent
65b7e64c1f
commit
13b0c0915b
|
@ -18,6 +18,8 @@
|
||||||
# EXTRA_OBJS : extra object files
|
# EXTRA_OBJS : extra object files
|
||||||
# SUBDIRS : subdirectories that contain a Makefile
|
# SUBDIRS : subdirectories that contain a Makefile
|
||||||
# EXTRASUBDIRS : subdirectories that do not contain a Makefile
|
# EXTRASUBDIRS : subdirectories that do not contain a Makefile
|
||||||
|
# PLTESTS : Perl test scripts
|
||||||
|
# CTESTS : C test sources
|
||||||
|
|
||||||
# First some useful definitions
|
# First some useful definitions
|
||||||
|
|
||||||
|
@ -57,6 +59,9 @@ LINT = @LINT@
|
||||||
LINTFLAGS = @LINTFLAGS@
|
LINTFLAGS = @LINTFLAGS@
|
||||||
ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL)
|
ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL)
|
||||||
WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check
|
WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check
|
||||||
|
WINETEST = $(TOPOBJDIR)/programs/winetest/winetest
|
||||||
|
RUNTEST = $(TOPSRCDIR)/programs/winetest/runtest
|
||||||
|
TESTRESULTS = $(PLTESTS:.pl=.ok) $(CTESTS:.c=.ok)
|
||||||
WINEBUILD = $(TOPOBJDIR)/tools/winebuild/winebuild
|
WINEBUILD = $(TOPOBJDIR)/tools/winebuild/winebuild
|
||||||
MAKEDEP = $(TOPOBJDIR)/tools/makedep
|
MAKEDEP = $(TOPOBJDIR)/tools/makedep
|
||||||
WRC = $(TOPOBJDIR)/tools/wrc/wrc
|
WRC = $(TOPOBJDIR)/tools/wrc/wrc
|
||||||
|
@ -95,7 +100,7 @@ LINTS = $(C_SRCS:.c=.ln)
|
||||||
|
|
||||||
# Implicit rules
|
# Implicit rules
|
||||||
|
|
||||||
.SUFFIXES: .mc .rc .mc.rc .res .spec .spec.c .glue.c
|
.SUFFIXES: .mc .rc .mc.rc .res .spec .spec.c .glue.c .pl .ok
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(ALLCFLAGS) -o $@ $<
|
$(CC) -c $(ALLCFLAGS) -o $@ $<
|
||||||
|
@ -121,7 +126,10 @@ LINTS = $(C_SRCS:.c=.ln)
|
||||||
.c.ln:
|
.c.ln:
|
||||||
$(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
|
$(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
|
||||||
|
|
||||||
.PHONY: all install uninstall clean distclean depend dummy
|
.pl.ok:
|
||||||
|
$(RUNTEST) $(TOPOBJDIR) $< $(RUNTESTFLAGS) && touch $@
|
||||||
|
|
||||||
|
.PHONY: all install uninstall clean distclean depend dummy test testclean
|
||||||
|
|
||||||
# 'all' target first in case the enclosing Makefile didn't define any target
|
# 'all' target first in case the enclosing Makefile didn't define any target
|
||||||
|
|
||||||
|
@ -212,11 +220,17 @@ depend: $(MAKEDEP) $(GEN_C_SRCS) $(SUBDIRS:%=%/__depend__)
|
||||||
$(SUBDIRS:%=%/__clean__): dummy
|
$(SUBDIRS:%=%/__clean__): dummy
|
||||||
cd `dirname $@` && $(MAKE) clean
|
cd `dirname $@` && $(MAKE) clean
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/__testclean__): dummy
|
||||||
|
cd `dirname $@` && $(MAKE) testclean
|
||||||
|
|
||||||
$(EXTRASUBDIRS:%=%/__clean__): dummy
|
$(EXTRASUBDIRS:%=%/__clean__): dummy
|
||||||
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
|
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
|
||||||
|
|
||||||
|
testclean:: $(SUBDIRS:%=%/__testclean__)
|
||||||
|
$(RM) $(TESTRESULTS)
|
||||||
|
|
||||||
clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
|
clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
|
||||||
$(RM) $(CLEAN_FILES) $(GEN_C_SRCS) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS)
|
$(RM) $(CLEAN_FILES) $(GEN_C_SRCS) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(TESTRESULTS) $(PROGRAMS)
|
||||||
|
|
||||||
# Rules for installing
|
# Rules for installing
|
||||||
|
|
||||||
|
@ -226,6 +240,15 @@ $(SUBDIRS:%=%/__install__): dummy
|
||||||
$(SUBDIRS:%=%/__uninstall__): dummy
|
$(SUBDIRS:%=%/__uninstall__): dummy
|
||||||
cd `dirname $@` && $(MAKE) uninstall
|
cd `dirname $@` && $(MAKE) uninstall
|
||||||
|
|
||||||
|
# Rules for testing
|
||||||
|
|
||||||
|
test:: $(TESTRESULTS)
|
||||||
|
|
||||||
|
$(TESTRESULTS): $(WINETEST)
|
||||||
|
|
||||||
|
$(WINETEST):
|
||||||
|
cd $(TOPOBJDIR)/programs/winetest && $(MAKE) winetest
|
||||||
|
|
||||||
# Misc. rules
|
# Misc. rules
|
||||||
|
|
||||||
$(SPEC_SRCS:.spec=.spec.c): $(WINEBUILD)
|
$(SPEC_SRCS:.spec=.spec.c): $(WINEBUILD)
|
||||||
|
|
22
Makefile.in
22
Makefile.in
|
@ -1,13 +1,15 @@
|
||||||
# This Makefile understands the following targets:
|
# This Makefile understands the following targets:
|
||||||
#
|
#
|
||||||
# all (default): build wine
|
# all (default): build wine
|
||||||
# clean: remove all intermediate files
|
# clean: remove all intermediate files
|
||||||
# distclean: also remove all files created by configure
|
# distclean: also remove all files created by configure
|
||||||
# install: install everything
|
# test: run tests
|
||||||
# uninstall: uninstall everything
|
# testclean: clean test results to force running all tests again
|
||||||
# depend: create the dependencies
|
# install: install everything
|
||||||
# etags: create a TAGS file for Emacs.
|
# uninstall: uninstall everything
|
||||||
# manpages: compile manpages for Wine API
|
# depend: create the dependencies
|
||||||
|
# etags: create a TAGS file for Emacs.
|
||||||
|
# manpages: compile manpages for Wine API
|
||||||
#
|
#
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
|
@ -130,6 +132,10 @@ checklink::
|
||||||
@cd dlls && $(MAKE) checklink
|
@cd dlls && $(MAKE) checklink
|
||||||
@cd debugger && $(MAKE) checklink
|
@cd debugger && $(MAKE) checklink
|
||||||
|
|
||||||
|
test::
|
||||||
|
@cd programs/winetest && $(MAKE) test
|
||||||
|
@cd dlls && $(MAKE) test
|
||||||
|
|
||||||
TAGS etags:
|
TAGS etags:
|
||||||
etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
|
etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,10 @@ lib$(MODULE).dll: $(ALL_OBJS) Makefile.in
|
||||||
checklink:: lib$(MODULE).$(LIBEXT)
|
checklink:: lib$(MODULE).$(LIBEXT)
|
||||||
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -l$(MODULE) $(ALL_LIBS) && $(RM) checklink
|
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -l$(MODULE) $(ALL_LIBS) && $(RM) checklink
|
||||||
|
|
||||||
|
# Rules for testing
|
||||||
|
|
||||||
|
$(TESTRESULTS): lib$(MODULE).$(LIBEXT)
|
||||||
|
|
||||||
# Rules for debug channels
|
# Rules for debug channels
|
||||||
|
|
||||||
debug_channels: dummy
|
debug_channels: dummy
|
||||||
|
|
|
@ -764,6 +764,9 @@ x11drv/libx11drv.$(LIBEXT): dummy libuser32.$(LIBEXT) libgdi32.$(LIBEXT) \
|
||||||
|
|
||||||
# Misc rules
|
# Misc rules
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/__test__): dummy
|
||||||
|
@cd `dirname $@` && $(MAKE) test
|
||||||
|
|
||||||
$(SUBDIRS:%=%/__checklink__): dummy
|
$(SUBDIRS:%=%/__checklink__): dummy
|
||||||
@cd `dirname $@` && $(MAKE) checklink
|
@cd `dirname $@` && $(MAKE) checklink
|
||||||
|
|
||||||
|
@ -774,6 +777,8 @@ install:: $(SUBDIRS:%=%/__install__)
|
||||||
|
|
||||||
uninstall:: $(SUBDIRS:%=%/__uninstall__)
|
uninstall:: $(SUBDIRS:%=%/__uninstall__)
|
||||||
|
|
||||||
|
test:: $(SUBDIRS:%=%/__test__)
|
||||||
|
|
||||||
checklink:: $(SUBDIRS:%=%/__checklink__)
|
checklink:: $(SUBDIRS:%=%/__checklink__)
|
||||||
|
|
||||||
debug_channels:: $(SUBDIRS:%=%/__debug_channels__)
|
debug_channels:: $(SUBDIRS:%=%/__debug_channels__)
|
||||||
|
|
|
@ -31,6 +31,10 @@ $(MODULE): $(MODULE).so
|
||||||
checklink:: $(MODULE).so
|
checklink:: $(MODULE).so
|
||||||
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(MODULE).so $(ALL_LIBS) && $(RM) checklink
|
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(MODULE).so $(ALL_LIBS) && $(RM) checklink
|
||||||
|
|
||||||
|
# Rules for testing
|
||||||
|
|
||||||
|
$(TESTRESULTS): $(MODULE).so
|
||||||
|
|
||||||
# Rules for debug channels
|
# Rules for debug channels
|
||||||
|
|
||||||
debug_channels: dummy
|
debug_channels: dummy
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Wrapper script to run tests from inside the Wine tree
|
||||||
|
#
|
||||||
|
# Usage: runtest $TOPOBJDIR input_file [flags...]
|
||||||
|
#
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
echo "Usage: $0 \$TOPOBJDIR input_file [flags]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -lt 2 ]
|
||||||
|
then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$1" ]
|
||||||
|
then
|
||||||
|
topobjdir=`cd "$1" && pwd`
|
||||||
|
else
|
||||||
|
echo "$1 is not a directory"
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
LD_LIBRARY_PATH="$topobjdir/dlls:$topobjdir:$LD_LIBRARY_PATH"
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
|
WINESERVER="$topobjdir/server/wineserver"
|
||||||
|
export WINESERVER
|
||||||
|
WINELOADER="$topobjdir/wine"
|
||||||
|
export WINELOADER
|
||||||
|
testdir=`dirname "$0"`
|
||||||
|
infile="$2"
|
||||||
|
shift 2
|
||||||
|
exec $topobjdir/programs/winetest/winetest -- -I "$testdir" $infile $@
|
Loading…
Reference in New Issue