[cmake] Run rest of the tests on Windows (#668)
This commit is contained in:
parent
2dbdeb1421
commit
4e3cf91af2
|
@ -32,16 +32,16 @@ install:
|
||||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-x86_64-ragel"
|
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-x86_64-ragel"
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" vcpkg install glib:%triplet% freetype:%triplet%'
|
- 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" vcpkg install glib:%triplet% freetype:%triplet% cairo:%triplet%'
|
||||||
- 'if "%compiler%"=="msvc" md build'
|
- 'if "%compiler%"=="msvc" md build'
|
||||||
- 'if "%compiler%"=="msvc" cd build'
|
- 'if "%compiler%"=="msvc" cd build'
|
||||||
- 'if "%compiler%"=="msvc" set PATH=%PATH%;C:\Program Files (x86)\MSBuild\14.0\Bin;c:\msys64\mingw64\bin' # msys2 is added just for having "ragel" on PATH
|
- 'if "%compiler%"=="msvc" set PATH=%PATH%;C:\Program Files (x86)\MSBuild\14.0\Bin;c:\msys64\mingw64\bin' # msys2 is added just for having "ragel" on PATH
|
||||||
|
|
||||||
- 'if "%compiler%"=="msvc" if "%platform%"=="ARM" cmake -DHB_HAVE_UNISCRIBE=ON -DHB_HAVE_DIRECTWRITE=ON -G "%generator%" ../'
|
- 'if "%compiler%"=="msvc" if "%platform%"=="ARM" cmake -DHB_HAVE_UNISCRIBE=ON -DHB_HAVE_DIRECTWRITE=ON -G "%generator%" ../'
|
||||||
- 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" cmake -DHB_HAVE_UNISCRIBE=ON -DHB_HAVE_DIRECTWRITE=ON -DHB_HAVE_GLIB=ON -DHB_HAVE_FREETYPE=ON -G "%generator%" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake ../'
|
- 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" cmake -DHB_HAVE_UNISCRIBE=ON -DHB_HAVE_DIRECTWRITE=ON -DHB_HAVE_GLIB=ON -DHB_HAVE_FREETYPE=ON -DHB_BUILD_UTILS=ON -G "%generator%" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake ../'
|
||||||
|
|
||||||
- 'if "%compiler%"=="msvc" msbuild harfbuzz.sln /p:Configuration=%configuration% /p:Platform=%platform%'
|
- 'if "%compiler%"=="msvc" msbuild harfbuzz.sln /p:Configuration=%configuration% /p:Platform=%platform%'
|
||||||
- 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" ctest --output-on-failure'
|
- 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" ctest --output-on-failure -C %configuration%'
|
||||||
|
|
||||||
- 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-$MSYS2_ARCH-{freetype,cairo,icu,gettext,gobject-introspection,gcc,gcc-libs,glib2,graphite2,pkg-config,python2}"'
|
- 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-$MSYS2_ARCH-{freetype,cairo,icu,gettext,gobject-introspection,gcc,gcc-libs,glib2,graphite2,pkg-config,python2}"'
|
||||||
- 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || (cat */test-suite.log test/*/test-suite.log && false)"'
|
- 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || (cat */test-suite.log test/*/test-suite.log && false)"'
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
add_subdirectory(api)
|
add_subdirectory(api)
|
||||||
add_subdirectory(shaping)
|
add_subdirectory(shaping)
|
||||||
# Not ready yet
|
add_subdirectory(fuzzing)
|
||||||
if (NOT MSVC)
|
|
||||||
add_subdirectory(fuzzing)
|
|
||||||
endif ()
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
if (HB_HAVE_GLIB)
|
if (HB_HAVE_GLIB)
|
||||||
add_executable (hb-fuzzer hb-fuzzer.cc hb-fuzzer.hh main.cc)
|
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
|
||||||
|
extract_make_variable (hb_fuzzer_SOURCES ${MAKEFILEAM})
|
||||||
|
add_executable (hb-fuzzer ${hb_fuzzer_SOURCES})
|
||||||
target_link_libraries (hb-fuzzer harfbuzz)
|
target_link_libraries (hb-fuzzer harfbuzz)
|
||||||
add_test (hb-fuzzer python run-fuzzer-tests.py)
|
add_test (NAME hb-fuzzer
|
||||||
set_tests_properties (hb-fuzzer PROPERTIES
|
COMMAND python run-fuzzer-tests.py $<TARGET_FILE:hb-fuzzer>
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
ENVIRONMENT "top_builddir=${PROJECT_BINARY_DIR};testdir=test;fuzzingdir=fuzzing"
|
|
||||||
)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -63,9 +63,6 @@ TESTS_ENVIRONMENT = \
|
||||||
endif
|
endif
|
||||||
|
|
||||||
check:
|
check:
|
||||||
cat $(srcdir)/../shaping/tests/fuzzed.tests | \
|
$(srcdir)/run-fuzzer-tests.py
|
||||||
cut -d: -f1 | while read x; do \
|
|
||||||
./hb-fuzzer $(srcdir)/../shaping/$$x; \
|
|
||||||
done
|
|
||||||
|
|
||||||
-include $(top_srcdir)/git.mk
|
-include $(top_srcdir)/git.mk
|
||||||
|
|
|
@ -6,9 +6,15 @@ import sys, os, subprocess
|
||||||
srcdir = os.environ.get ("srcdir", ".")
|
srcdir = os.environ.get ("srcdir", ".")
|
||||||
EXEEXT = os.environ.get ("EXEEXT", "")
|
EXEEXT = os.environ.get ("EXEEXT", "")
|
||||||
top_builddir = os.environ.get ("top_builddir", ".")
|
top_builddir = os.environ.get ("top_builddir", ".")
|
||||||
testdir = os.environ.get ("testdir", ".")
|
hb_fuzzer = os.path.join (top_builddir, "hb-fuzzer" + EXEEXT)
|
||||||
fuzzingdir = os.environ.get ("fuzzingdir", ".")
|
|
||||||
hb_fuzzer = os.path.join (top_builddir, testdir, fuzzingdir, "hb-fuzzer" + EXEEXT)
|
if hb_fuzzer == ".\\hb-fuzzer":
|
||||||
|
hb_fuzzer = "./hb-fuzzer.exe"
|
||||||
|
|
||||||
|
if not os.path.exists (hb_fuzzer):
|
||||||
|
hb_fuzzer = sys.argv[1]
|
||||||
|
|
||||||
|
print ('hb_fuzzer:', hb_fuzzer)
|
||||||
fails = 0
|
fails = 0
|
||||||
|
|
||||||
for line in open (os.path.join (srcdir, "..", "shaping", "tests", "fuzzed.tests")):
|
for line in open (os.path.join (srcdir, "..", "shaping", "tests", "fuzzed.tests")):
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
if (HB_BUILD_UTILS)
|
if (HB_BUILD_UTILS)
|
||||||
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
|
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
|
||||||
extract_make_variable (TESTS ${MAKEFILEAM})
|
extract_make_variable (TESTS ${MAKEFILEAM})
|
||||||
|
|
||||||
foreach (test IN ITEMS ${TESTS})
|
foreach (test IN ITEMS ${TESTS})
|
||||||
add_test (${test} python run-tests.py "${test}")
|
add_test (NAME ${test}
|
||||||
set_tests_properties (${test} PROPERTIES
|
COMMAND python run-tests.py $<TARGET_FILE:hb-shape> "${test}"
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
ENVIRONMENT "top_builddir=${PROJECT_BINARY_DIR};utildir=."
|
|
||||||
)
|
|
||||||
endforeach ()
|
endforeach ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -28,14 +28,22 @@ EXEEXT = os.environ.get ("EXEEXT", "")
|
||||||
extra_options = "--verify"
|
extra_options = "--verify"
|
||||||
hb_shape = os.path.join (top_builddir, utildir, "hb-shape" + EXEEXT)
|
hb_shape = os.path.join (top_builddir, utildir, "hb-shape" + EXEEXT)
|
||||||
|
|
||||||
fails = 0
|
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
|
||||||
|
if not os.path.exists (hb_shape):
|
||||||
|
hb_shape = args[0]
|
||||||
|
args = args[1:]
|
||||||
|
|
||||||
|
fails = 0
|
||||||
|
|
||||||
reference = False
|
reference = False
|
||||||
if len (args) and args[0] == "--reference":
|
if len (args) and args[0] == "--reference":
|
||||||
reference = True
|
reference = True
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
|
|
||||||
|
if not reference:
|
||||||
|
print ('hb_shape:', hb_shape)
|
||||||
|
|
||||||
if not len (args):
|
if not len (args):
|
||||||
args = [sys.stdin]
|
args = [sys.stdin]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue