Fix make check issue on out-of-tree builds and test it (#672)
authorEbrahim Byagowi <ebrahim@gnu.org>
Tue, 2 Jan 2018 20:22:12 +0000 (23:52 +0330)
committerGitHub <noreply@github.com>
Tue, 2 Jan 2018 20:22:12 +0000 (23:52 +0330)
.circleci/config.yml
test/fuzzing/Makefile.am
test/fuzzing/run-fuzzer-tests.py
test/shaping/run-tests.py

index 8f164384f1ed72aa308916767351e58582b6a74b..3ddc693bb844e027c92146109d8e717937826b25 100644 (file)
@@ -14,14 +14,14 @@ jobs:
       - run: make -Cbuild test
       - run: make -Cbuild install
 
-  fedora:
+  fedora-out-of-tree:
     docker:
       - image: fedora
     steps:
       - checkout
       - run: dnf install -y pkg-config ragel gcc gcc-c++ automake autoconf libtool make which glib2-devel freetype-devel cairo-devel libicu-devel gobject-introspection-devel graphite2-devel redhat-rpm-config || true
-      - run: ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2
-      - run: make && make check
+      - run: NOCONFIGURE=1 ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2
+      - run: mkdir build && cd build && ../configure && make && make check
 
   archlinux:
     docker:
@@ -140,7 +140,7 @@ workflows:
   build:
     jobs:
       - oracledeveloperstudio
-      - fedora
+      - fedora-out-of-tree
       - archlinux
       - freebsd9
       - base
index 6120afce7b8080c4d5e4e80aab08b8f46d86a467..a7f736239123e14ff565906f8b7a1bd4cccdcd58 100644 (file)
@@ -46,23 +46,7 @@ hb_fuzzer_DEPENDENCIES = \
        lib \
        $(NULL)
 
-AM_TESTS_ENVIRONMENT = \
-       EXEEXT="$(EXEEXT)"; \
-       export EXEEXT; \
-       srcdir="$(srcdir)"; \
-       export srcdir; \
-       builddir="$(builddir)"; \
-       export builddir; \
-       $(NULL)
-
-if AUTOMAKE_OLDER_THAN_1_13
-TESTS_ENVIRONMENT = \
-       $(AM_TESTS_ENVIRONMENT) \
-       $(TESTS_LOG_COMPILER) \
-       $(NULL)
-endif
-
 check:
-       $(srcdir)/run-fuzzer-tests.py
+       EXEEXT="$(EXEEXT)" srcdir="$(srcdir)" builddir="$(builddir)" $(srcdir)/run-fuzzer-tests.py
 
 -include $(top_srcdir)/git.mk
index aa615af700682a19c3ff8658c1bf49c6d2a03ea3..673ee9a96287b96a78d21228437301f7331a3d54 100755 (executable)
@@ -8,10 +8,12 @@ EXEEXT = os.environ.get ("EXEEXT", "")
 top_builddir = os.environ.get ("top_builddir", ".")
 hb_fuzzer = os.path.join (top_builddir, "hb-fuzzer" + EXEEXT)
 
-if hb_fuzzer == ".\\hb-fuzzer":
-       hb_fuzzer = "./hb-fuzzer.exe"
-
 if not os.path.exists (hb_fuzzer):
+       if len (sys.argv) == 1 or not os.path.exists (sys.argv[1]):
+               print ("""Failed to find hb-fuzzer binary automatically,
+please provide it as the first argument to the tool""")
+               sys.exit (1)
+
        hb_fuzzer = sys.argv[1]
 
 print ('hb_fuzzer:', hb_fuzzer)
index 342c006ef22a269a5d9b3539bae55af9374279e5..306fcc3e0191debcf8e06819207dd3a34d0558c9 100755 (executable)
@@ -31,6 +31,11 @@ hb_shape = os.path.join (top_builddir, utildir, "hb-shape" + EXEEXT)
 args = sys.argv[1:]
 
 if not os.path.exists (hb_shape):
+       if len (sys.argv) == 1 or not os.path.exists (sys.argv[1]):
+               print ("""Failed to find hb-shape binary automatically,
+please provide it as the first argument to the tool""")
+               sys.exit (1)
+
        hb_shape = args[0]
        args = args[1:]