all:
- @echo "There's nothing to build here, really."
+ @echo "There's nothing to build here except the tests."
@echo
@echo "Try: make test"
runtests:
- make -C python test
+ make -C python runtests
+ make -C dotnet runtests
test:
./wvtestrunner.pl $(MAKE) runtests
--- /dev/null
+all:
+ @echo "Try: make test"
+ @false
+
+include wvtestrules.mk
+
+CPPFLAGS=-I.
+
+t/test.exe: wvtest.cs wvtestmain.cs t/wvtest.t.cs.E
+ gmcs /out:$@ /debug $^
+
+runtests: t/test.exe
+ cd t && mono --debug test.exe
+
+test:
+ ../wvtestrunner.pl $(MAKE) runtests
+
+clean::
+ rm -f *~ t/*~ *.E t/*.E *.d t/*.d t/*.exe t/*.mdb
+
--- /dev/null
+/*
+ * Versaplex:
+ * Copyright (C)2007-2008 Versabanq Innovations Inc. and contributors.
+ * See the included file named LICENSE for license information.
+ */
+using System;
+using Wv.Test;
+
+public class WvTestMain
+{
+ public static void Main()
+ {
+ WvTest.DoMain();
+ }
+}
# our C# (.cs) files
CSCPP=cpp
-# Cygwin supports symlinks, but they aren't actually useful outside cygwin,
-# so let's just copy instead. We also use Microsoft's .net compiler instead
-# of mono.
-ifeq ($(OS),Windows_NT)
- CSC?=csc
- SYMLINK=cp
- MONORUN=
-else
- CSC?=gmcs -langversion:linq
- SYMLINK=ln -sf
- PKGS += /r:Mono.Posix
- MONORUN=mono --debug
-endif
-
CSFLAGS=/warn:4 /debug
#CSFLAGS += /warnaserror
| sed -e 's,^#include,//#include,' \
| grep -v '^# [0-9]' \
>$@ || (rm -f $@ && exit 1)
-
-
-define csbuild
- @for d in $(filter ../%.dll,$^); do \
- rm -f $$(basename $$d); \
- $(SYMLINK) -v $$d .; \
- done
- $(CSC) $(CSFLAGS) /target:$1 /out:$@ \
- $(PKGS) \
- $(filter %.cs.E %.cs,$^) \
- $(patsubst %.dll,/r:%.dll,$(filter %.dll,$^))
-endef
-
-
-%.dll: assemblyinfo.cs
- $(call csbuild,library)
-
-# This must come before the %.cs rule, since %.cs.E files are better.
-%.exe: %.cs.E
- $(call csbuild,exe)
-
-%.exe: %.cs
- $(call csbuild,exe)
-
-%: %.exe
- rm -f $@
- $(SYMLINK) $< $@
-
-%.pass: %.exe
- rm -f $@
- $(TESTRUNNER) $(MONORUN) ./$^
- touch $@
-
-clean::
- rm -f *~ *.E *.d *.exe *.dll *.mdb *.pdb
@echo "Try: make test"
@false
-test:
- ../wvtestrunner.pl python wvtestmain.py \
+runtests:
+ python wvtestmain.py \
$(patsubst ./%t,%t/*.py,$(shell find -type d -name t))
+test:
+ ../wvtestrunner.pl $(MAKE) runtests