[runtime] Make eglib tests run on CI (mono/mono#16187)
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Sat, 31 Aug 2019 06:06:25 +0000 (02:06 -0400)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Sat, 31 Aug 2019 06:06:25 +0000 (02:06 -0400)
[runtime] Make eglib tests run on CI

Update mono/eglib SUBDIRS to build tests after eglib is built.

Add a check-local automake rule.

Add CI steps to run the eglib tests.

Commit migrated from https://github.com/mono/mono/commit/8bc27f6665fdd8464f3fdad15a974e5f38f9b7f2

src/mono/mono/eglib/Makefile.am
src/mono/mono/eglib/test/.gitignore
src/mono/mono/eglib/test/Makefile.am

index ba10873..888e1d6 100644 (file)
@@ -1,9 +1,6 @@
 include $(top_srcdir)/mk/common.mk
 
-# FIXME
-#SUBDIRS = test
-
-DIST_SUBDIRS = test
+SUBDIRS = . test
 
 noinst_LTLIBRARIES = libeglib.la
 
index 2d669e1..c5d4b23 100644 (file)
@@ -8,5 +8,6 @@
 /semantic.cache
 /.project
 /.cproject
+/assertf
 /test-eglib
 /test-glib
index d9cc587..68b68d6 100644 (file)
@@ -41,15 +41,24 @@ CXXFLAGS += $(GLIB_TEST_FLAGS_COMMON) @CXXFLAGS_COMMON@
 test_eglib_LDADD = ../libeglib.la $(LTLIBICONV)
 assertf_LDADD = ../libeglib.la $(LTLIBICONV)
 
-# Something amiss with subdirs ordering?
-../libeglib.la: ../goutput.c # etc
-       $(MAKE)  -C .. $(@F)
+abs_srcdir = $(abspath $(srcdir))
 
-run-eglib: all
-       srcdir=`readlink -f $(srcdir)` ./test-eglib
+if DISABLE_EXECUTABLES
+run-eglib:
+else
+# FIXME: Various unit tests are broken on Win32, see https://github.com/mono/mono/issues/16576
+if HOST_WIN32
+run-eglib:
+else
+run-eglib:
+       srcdir="$(abs_srcdir)" ./test-eglib
 
 noinst_PROGRAMS = test-eglib assertf
+endif # !HOST_WIN32
+endif # DISABLE_EXECUTABLES
 
 run-both: run-eglib
 
+check-local: run-both
+
 MAINTAINERCLEANFILES = Makefile.in