[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"
|
||||
|
||||
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" 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" 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" 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 "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(shaping)
|
||||
# Not ready yet
|
||||
if (NOT MSVC)
|
||||
add_subdirectory(fuzzing)
|
||||
endif ()
|
||||
add_subdirectory(fuzzing)
|
||||
|
@ -1,9 +1,9 @@
|
||||
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)
|
||||
add_test (hb-fuzzer python run-fuzzer-tests.py)
|
||||
set_tests_properties (hb-fuzzer PROPERTIES
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
ENVIRONMENT "top_builddir=${PROJECT_BINARY_DIR};testdir=test;fuzzingdir=fuzzing"
|
||||
)
|
||||
add_test (NAME hb-fuzzer
|
||||
COMMAND python run-fuzzer-tests.py $<TARGET_FILE:hb-fuzzer>
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif ()
|
||||
|
@ -63,9 +63,6 @@ TESTS_ENVIRONMENT = \
|
||||
endif
|
||||
|
||||
check:
|
||||
cat $(srcdir)/../shaping/tests/fuzzed.tests | \
|
||||
cut -d: -f1 | while read x; do \
|
||||
./hb-fuzzer $(srcdir)/../shaping/$$x; \
|
||||
done
|
||||
$(srcdir)/run-fuzzer-tests.py
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@ -6,9 +6,15 @@ import sys, os, subprocess
|
||||
srcdir = os.environ.get ("srcdir", ".")
|
||||
EXEEXT = os.environ.get ("EXEEXT", "")
|
||||
top_builddir = os.environ.get ("top_builddir", ".")
|
||||
testdir = os.environ.get ("testdir", ".")
|
||||
fuzzingdir = os.environ.get ("fuzzingdir", ".")
|
||||
hb_fuzzer = os.path.join (top_builddir, testdir, fuzzingdir, "hb-fuzzer" + EXEEXT)
|
||||
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):
|
||||
hb_fuzzer = sys.argv[1]
|
||||
|
||||
print ('hb_fuzzer:', hb_fuzzer)
|
||||
fails = 0
|
||||
|
||||
for line in open (os.path.join (srcdir, "..", "shaping", "tests", "fuzzed.tests")):
|
||||
|
@ -1,11 +1,10 @@
|
||||
if (HB_BUILD_UTILS)
|
||||
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
|
||||
extract_make_variable (TESTS ${MAKEFILEAM})
|
||||
|
||||
foreach (test IN ITEMS ${TESTS})
|
||||
add_test (${test} python run-tests.py "${test}")
|
||||
set_tests_properties (${test} PROPERTIES
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
ENVIRONMENT "top_builddir=${PROJECT_BINARY_DIR};utildir=."
|
||||
)
|
||||
add_test (NAME ${test}
|
||||
COMMAND python run-tests.py $<TARGET_FILE:hb-shape> "${test}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
@ -28,14 +28,22 @@ EXEEXT = os.environ.get ("EXEEXT", "")
|
||||
extra_options = "--verify"
|
||||
hb_shape = os.path.join (top_builddir, utildir, "hb-shape" + EXEEXT)
|
||||
|
||||
fails = 0
|
||||
args = sys.argv[1:]
|
||||
|
||||
if not os.path.exists (hb_shape):
|
||||
hb_shape = args[0]
|
||||
args = args[1:]
|
||||
|
||||
fails = 0
|
||||
|
||||
reference = False
|
||||
if len (args) and args[0] == "--reference":
|
||||
reference = True
|
||||
args = args[1:]
|
||||
|
||||
if not reference:
|
||||
print ('hb_shape:', hb_shape)
|
||||
|
||||
if not len (args):
|
||||
args = [sys.stdin]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user