[esnacc-dev] [PATCH 08/11] appveyor: Enable esnacc unit tests

Aaron Conole aconole at bytheb.org
Tue Dec 6 19:47:06 UTC 2016


The unit tests should be run on the windows platform to ensure at least
basic sanity.

Signed-off-by: Aaron Conole <aconole at bytheb.org>
---
 Makefile.am                   | 4 ++--
 appveyor.yml                  | 1 +
 c-examples/simple/minbuf-ex.c | 6 +++++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d0c0e73..36dee8a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -93,10 +93,10 @@ pkgconfigdir = $(libdir)/pkgconfig
 noinst_HEADERS += $(EXTRA_DIST)
 
 .asn1.c:
-	compiler/esnacc -c -mo `dirname $@` $<
+	compiler/esnacc$(EXEEXT) -c -mo `dirname $@` $<
 
 .asn1.cpp:
-	compiler/esnacc -C -mo `dirname $@` $<
+	compiler/esnacc$(EXEEXT) -C -mo `dirname $@` $<
 
 SUFFIXES += .in
 .in:
diff --git a/appveyor.yml b/appveyor.yml
index 04363b4..176801a 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -27,3 +27,4 @@ build_script:
 - C:\MinGW\msys\1.0\bin\bash -lc "cd /c/esnacc-ng && ./boot.sh"
 - C:\MinGW\msys\1.0\bin\bash -lc "cd /c/esnacc-ng && ./configure CC=build-aux/cccl CXX=build-aux/cccl LD=\"`which link`\" --with-pthread=C:/pthreads-win32/Pre-built.2"
 - C:\MinGW\msys\1.0\bin\bash -lc "cd /c/esnacc-ng && make "
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/esnacc-ng && ./compiler/.libs/esnacc.exe -c -mo `dirname asn1specs/p-rec.c` asn1specs/p-rec.asn1 && make check"
diff --git a/c-examples/simple/minbuf-ex.c b/c-examples/simple/minbuf-ex.c
index cefba01..c592029 100644
--- a/c-examples/simple/minbuf-ex.c
+++ b/c-examples/simple/minbuf-ex.c
@@ -34,13 +34,17 @@
 #include "snacc.h"
 #include "asn-incl.h"
 
+#ifndef WIN32
 #include <sys/file.h>
 #include <sys/stat.h>
 #if HAVE_FCNTL_H 
 #include <fcntl.h>
 #endif
-#include <stdio.h>
 #include <unistd.h>
+#else
+#include <windows.h>
+#endif
+#include <stdio.h>
 
 #include "p-rec.h"
 #include "min-buf.h"
-- 
2.7.4




More information about the dev mailing list