Skip to content

Commit

Permalink
make distwin32: also run tests
Browse files Browse the repository at this point in the history
wine is used to do run the .exe's. The perl and shell scripts are
skipped.
  • Loading branch information
bertfrees committed Jun 6, 2017
1 parent 0f5940a commit 034aacd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ RUN apt-get install -y make autoconf automake libtool pkg-config
# for cross-compiling
RUN apt-get install -y mingw32 mingw-w64 libc6-dev-i386

# for running cross-compiled tests
RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y wine32 wine64

# for check_yaml
WORKDIR /root/src/
RUN apt-get install -y curl patch
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ distwin32-dir :
@if which i586-mingw32msvc-gcc >/dev/null; then \
./configure --host i586-mingw32msvc --prefix=$(CURDIR)/liblouis-$(VERSION)-win32 && \
make LDFLAGS="$$LDFLAGS -avoid-version -Xcompiler -static-libgcc" && \
make check && \
make install; \
elif which i686-w64-mingw32-gcc >/dev/null; then \
./configure --host i686-w64-mingw32 --prefix=$(CURDIR)/liblouis-$(VERSION)-win32 && \
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,12 @@ case $host in
*mingw* | *cygwin*)
CFLAGS="$CFLAGS -Wl,--add-stdcall-alias"
LDFLAGS="$LDFLAGS -avoid-version"
mingw=yes
;;
esac

AM_CONDITIONAL([MINGW], [test "$mingw" = yes])

AC_CONFIG_FILES([
Makefile
doc/Makefile
Expand Down
16 changes: 13 additions & 3 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,16 @@ program_TESTS = \

check_PROGRAMS = $(program_TESTS)

dist_check_SCRIPTS = \
dist_check_SCRIPTS =

if !MINGW
dist_check_SCRIPTS += \
check_all_tables.pl \
check_endless_loop.pl \
check_included_tables.sh \
multiple_table_path.pl \
ueb_test_data.pl
endif

# The present_progressive should not really fail but for the moment
# the issue doesn't seem to be critical enough that anybody has enough
Expand Down Expand Up @@ -203,8 +207,8 @@ yaml/da-dk-g18-dictionary_harness.yaml \
yaml/vi-g1_harness.yaml \
yaml/zh-chn.yaml

TEST_EXTENSIONS = .yaml
YAML_LOG_COMPILER = $(top_builddir)/tools/lou_checkyaml
TEST_EXTENSIONS = .yaml .pl
YAML_LOG_COMPILER = $(top_builddir)/tools/lou_checkyaml$(EXEEXT)

EXTRA_DIST = $(dist_yaml_TESTS)

Expand All @@ -221,3 +225,9 @@ AM_TESTS_ENVIRONMENT = \
PYTHONPATH=$(top_builddir)/python:$$PYTHONPATH \
LD_LIBRARY_PATH=$(top_builddir)/liblouis/.libs:$$LD_LIBRARY_PATH \
PATH=$(top_builddir)/tools:$$PATH

if MINGW
# FIXME: is there a way to prepend to LOG_COMPILE instead of to overwrite it?
LOG_COMPILE = wine32 $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
YAML_LOG_COMPILE = wine32 $(YAML_LOG_COMPILER) $(AM_YAML_LOG_FLAGS) $(YAML_LOG_FLAGS)
endif

0 comments on commit 034aacd

Please sign in to comment.