Added automated tests to the MSVC port

This commit is contained in:
Juan Jose Garcia Ripoll 2011-12-30 17:03:37 +01:00
parent d6f1599287
commit 932c6223ad
5 changed files with 88 additions and 11 deletions

View file

@ -35,7 +35,7 @@ GMP_TYPE = gc
ECL_THREADS = 1
# Set it to empty to remove support for Unicode characters
ECL_UNICODE = 1
ECL_UNICODE = 1
# Set it to non-empty to enable Win32 debug support
#ECL_DEBUG = 1
@ -194,6 +194,10 @@ ECL_FEATURES = (cons :wants-profile $(ECL_FEATURES))
!endif
ECL_MODULES = $(ECL_MODULES) bytecmp
ECL_FEATURES = (list* :builtin-bytecmp :wants-bytecmp $(ECL_FEATURES))
ECL_MODULES = $(ECL_MODULES) ecl-curl
ECL_FEATURES = (cons :wants-ecl-curl $(ECL_FEATURES))
ECL_MODULES = $(ECL_MODULES) deflate
ECL_FEATURES = (cons :wants-deflate $(ECL_FEATURES))
!MESSAGE ECL Modules: $(ECL_MODULES)
!MESSAGE ECL Features: $(ECL_FEATURES)
@ -387,6 +391,16 @@ install:
$(CP) encodings\*.* "$(libdir)\encodings"
!endif
check: package\ecl.exe
cd tests
$(MAKE)
recheck: package\ecl.exe
cd tests
$(MAKE) clean
$(MAKE)
package\ecl.exe: ecl2$(EXE)
$(MAKE) install ECL_THREADS=$(ECL_THREADS) ECL_UNICODE=$(ECL_UNICODE)
windows-nsi:
IF EXIST "$(TAR_DIR)" $(RMDIR) "$(TAR_DIR)"
$(MKDIR) "$(TAR_DIR)"

55
msvc/tests/Makefile Executable file
View file

@ -0,0 +1,55 @@
top_srcdir=..\..
ECLDIR=../package/
ECL=..\package\ecl.exe
all: output.ecl\ansi.log output.ecl\regressions.log
.PHONY: do-ansi do-regressions do-quicklisp cleanup clean-sources update
config.lsp: $(top_srcdir)\src\tests\config.lsp.in ..\c\cut.exe Makefile
..\c\cut.exe "@builddir@" "./" \
"@top_srcdir@" "../.." \
< $(top_srcdir)\src\tests\config.lsp.in > config.lsp
output.ecl\ansi.log: config.lsp
$(MAKE) do-ansi
output.ecl\regressions.log: config.lsp
$(MAKE) do-regressions
do-ansi: ansi-tests config.lsp
set ECLDIR=$(ECLDIR)
$(ECL) -norc -load config.lsp -eval "(ecl-tests::run-ansi-tests)" -eval "(ext:quit)"
do-regressions: regressions config.lsp
set ECLDIR=$(ECLDIR)
$(ECL) -norc -load config.lsp -eval "(ecl-tests::run-regressions-tests)" -eval "(ext:quit)"
do-quicklisp: quicklisp config.lsp
set ECLDIR=$(ECLDIR)
$(ECL) -norc -load config.lsp -eval "(ecl-tests::run-quicklisp-tests)" -eval "(ext:quit)"
#
# Create directories
#
ansi-tests: config.lsp
set ECLDIR=$(ECLDIR)
$(ECL) -norc -load config.lsp -eval "(ecl-tests::ensure-ansi-tests)" -eval "(ext:quit)"
regressions: config.lsp
set ECLDIR=$(ECLDIR)
$(ECL) -norc -load config.lsp -eval "(ecl-tests::ensure-regressions)" -eval "(ext:quit)"
quicklisp: config.lsp
set ECLDIR=$(ECLDIR)
$(ECL) -norc -load config.lsp -eval "(ecl-tests::ensure-quicklisp)" -eval "(ext:quit)"
#
# Cleanup
#
clean:
rm -rf output*
clean-sources:
test -f config.lsp.in || rm -rf bugs
rm -rf ansi-tests quicklisp
distclean: clean-sources clean
rm -rf cache
update: clean-sources
$(MAKE) ansi-tests regressions quicklisp

View file

@ -363,7 +363,10 @@
:lisp-files *module-symbols*
:ld-flags #-msvc '("-L./") #+windows '("ecl.res" "/F 10485760"))
(with-open-file (modules-list #P"build:MODULES" :direction :output)
(with-open-file (modules-list #P"build:MODULES" :direction :output
:if-exists :supersede
:if-does-not-exist :create)
(print *module-files*)
(dolist (module-file *module-files*)
(format modules-list "~A~%" module-file)))

12
src/tests/Makefile.in Normal file → Executable file
View file

@ -9,21 +9,21 @@ output.ecl/ansi.log: config.lsp
output.ecl/regressions.log: config.lsp
$(MAKE) do-regressions
do-ansi: ansi-tests
do-ansi: ansi-tests config.lsp
$(ECL) -norc -load config.lsp -eval '(ecl-tests::run-ansi-tests)' -eval '(ext:quit)' < /dev/null
do-regressions: regressions
do-regressions: regressions config.lsp
$(ECL) -norc -load config.lsp -eval '(ecl-tests::run-regressions-tests)' -eval '(ext:quit)' < /dev/null
do-quicklisp: quicklisp
do-quicklisp: quicklisp config.lsp
$(ECL) -norc -load config.lsp -eval '(ecl-tests::run-quicklisp-tests)' -eval '(ext:quit)' < /dev/null
#
# Create directories
#
ansi-tests:
ansi-tests: config.lsp
$(ECL) -norc -load config.lsp -eval '(ecl-tests::ensure-ansi-tests)' -eval '(ext:quit)' < /dev/null
regressions:
regressions: config.lsp
$(ECL) -norc -load config.lsp -eval '(ecl-tests::ensure-regressions)' -eval '(ext:quit)' < /dev/null
quicklisp:
quicklisp: config.lsp
$(ECL) -norc -load config.lsp -eval '(ecl-tests::ensure-quicklisp)' -eval '(ext:quit)' < /dev/null
#

11
src/tests/config.lsp.in Normal file → Executable file
View file

@ -20,16 +20,20 @@
(defvar *cache* (merge-pathnames "./cache/" *here*))
(defvar *test-image* (or (ext:getenv "TEST_IMAGE") "ecl"))
(defvar *test-image* (or (ext:getenv "TEST_IMAGE")
(namestring (truename "sys:ecl.exe"))))
(defvar *test-image-args*
(cond ((search "ecl" *test-image*)
'("-norc"))
'("-norc" "-eval" "(print (ext:getenv \"ECLDIR\"))" #+windows "-eval" #+windows "(require :cmp)"))
((search "sbcl" *test-image*)
'("--no-userinit" "--no-sysinit"))
(t
'())))
#+ecl
(ext:setenv "ECLDIR" (print (namestring (truename "SYS:"))))
(defvar *test-name* (or (ext:getenv "TEST_NAME") "ecl"))
(defvar *output-directory*
@ -64,6 +68,7 @@
(defvar *cleanup-extensions* '("fasl" "fasb" "c" "h" "obj" "o" "a" "lib" "dll" "dylib" "data"))
(require :cmp)
(require :ecl-curl)
(require :deflate)
(require :ql-minitar)
@ -202,7 +207,7 @@
(ext:run-program *test-image*
*test-image-args*
:input (merge-pathnames "doit.lsp" *ansi-tests-sandbox*)
:output output
:output t ; output
:error :output))
(ext:chdir *here*)))