Permalink
Browse files

Ignore errors building test db

	Also exclude unit tests if pkg-config is not available.
  • Loading branch information...
1 parent a874b29 commit 7cc57c530d3d5b509d5c3132d6fa97402b0637de @gonzalop gonzalop committed Feb 17, 2011
Showing with 20 additions and 4 deletions.
  1. +4 −0 Makefile.am
  2. +12 −0 configure.in
  3. +2 −2 src/Mono.WebServer/Makefile.am
  4. +2 −2 test/1.1/webcontrols/Makefile.am
View
@@ -1,2 +1,6 @@
+if UNITTESTS
SUBDIRS=man src test tools scripts docs packaging unittests
+else
+SUBDIRS=man src test tools scripts docs packaging
+endif
View
@@ -27,6 +27,17 @@ AC_ARG_WITH([runtime],
AC_HELP_STRING([--with-runtime],[use the specified runtime when xsp is installed]),
[RUNTIME=$withval])
+AC_ARG_WITH([unit-tests],
+ AC_HELP_STRING([--with-unit-tests],[build the unit tests]),
+ [UNIT_TESTS=$withval])
+
+if test ! "x${UNIT_TESTS}" = "x" ; then
+ AC_PATH_PROG(PKG_CONFIG,pkg-config,no)
+ if test "x$PKG_CONFIG" = "xno" ; then
+ UNIT_TESTS="no"
+ fi
+fi
+
AC_PATH_PROG(CSC, csc, no)
AC_PATH_PROG(GMCS, gmcs, no)
AC_PATH_PROG(DMCS, dmcs, no)
@@ -70,6 +81,7 @@ case "$host" in
;;
esac
+AM_CONDITIONAL(UNITTESTS, test x${UNIT_TESTS} = xyes)
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AM_CONDITIONAL(NET_2_0, test ! x$GMCS = xno)
AM_CONDITIONAL(NET_4_0, test ! x$DMCS = xno)
@@ -60,13 +60,13 @@ monowebserver4_build_sources = $(addprefix $(srcdir)/, $(monowebserver2_sources)
endif
2.0/Mono.WebServer2.dll: $(monowebserver2_build_sources)
- -mkdir 2.0
+ -$(MKDIR_P) 2.0
$(GMCS) -d:NET_2_0 $(MCSFLAGS) $(monowebserver2_references) /target:library /out:$@ $(monowebserver2_build_sources)
$(SN) -q -R $(builddir)/$@ $(srcdir)/../mono.snk
if NET_4_0
4.0/Mono.WebServer2.dll: $(monowebserver4_build_sources)
- -mkdir 4.0
+ -$(MKDIR_P) 4.0
$(DMCS) -d:NET_2_0 -d:NET_4_0 $(MCSFLAGS) $(monowebserver4_references) /target:library /out:$@ $(monowebserver4_build_sources)
$(SN) -q -R $(builddir)/$@ $(srcdir)/../mono.snk
endif
@@ -51,7 +51,7 @@ dbpage_test_setup.exe: $(dbpage_test_setup_build)
$(GMCS) -debug:full -r:Mono.Data.Sqlite.dll -r:System.Data.dll -out:$@ $^
dbpage1.sqlite: dbpage_test_setup.exe
- $(RUNTIME) dbpage_test_setup.exe
+ -@$(RUNTIME) dbpage_test_setup.exe 2> /dev/null || echo "Warning: could not create test SQLite database"
dbpage2.sqlite: dbpage_test_setup.exe
- $(RUNTIME) dbpage_test_setup.exe
+ -@$(RUNTIME) dbpage_test_setup.exe 2> /dev/null || echo "Warning: could not create test SQLite database"

0 comments on commit 7cc57c5

Please sign in to comment.