Merge pull request #796 from ebraminio/dev-run
Add a continuous builder using fswatch
This commit is contained in:
commit
279c70a5b3
|
@ -63,6 +63,7 @@ if (HB_HAVE_INTROSPECTION)
|
||||||
set (HB_HAVE_GLIB ON)
|
set (HB_HAVE_GLIB ON)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
option(HB_DISABLE_TEST_PROGS OFF "Do not build some of the test programs, useful for continuous builds")
|
||||||
option(HB_CHECK OFF "Do a configuration suitable for testing (shared library and enable all options)")
|
option(HB_CHECK OFF "Do a configuration suitable for testing (shared library and enable all options)")
|
||||||
if (HB_CHECK)
|
if (HB_CHECK)
|
||||||
set (BUILD_SHARED_LIBS ON)
|
set (BUILD_SHARED_LIBS ON)
|
||||||
|
@ -807,6 +808,7 @@ endif ()
|
||||||
|
|
||||||
|
|
||||||
## src/ executables
|
## src/ executables
|
||||||
|
if (NOT HB_DISABLE_TEST_PROGS)
|
||||||
foreach (prog main test test-would-substitute test-size-params test-buffer-serialize hb-ot-tag)
|
foreach (prog main test test-would-substitute test-size-params test-buffer-serialize hb-ot-tag)
|
||||||
set (prog_name ${prog})
|
set (prog_name ${prog})
|
||||||
if (${prog_name} STREQUAL "test")
|
if (${prog_name} STREQUAL "test")
|
||||||
|
@ -817,7 +819,7 @@ foreach (prog main test test-would-substitute test-size-params test-buffer-seria
|
||||||
target_link_libraries(${prog_name} harfbuzz ${THIRD_PARTY_LIBS})
|
target_link_libraries(${prog_name} harfbuzz ${THIRD_PARTY_LIBS})
|
||||||
endforeach ()
|
endforeach ()
|
||||||
set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
|
set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
|
||||||
|
endif ()
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
if (UNIX OR MINGW)
|
if (UNIX OR MINGW)
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for cmd in cmake ninja fswatch; do
|
||||||
|
command -v $cmd >/dev/null 2>&1 || { echo >&2 "This script needs $cmd be installed"; exit 1; }
|
||||||
|
done
|
||||||
|
|
||||||
|
[ $# = 0 ] && echo Usage: "src/dev-run.sh [FONT-FILE] [TEXT]" && exit
|
||||||
|
|
||||||
|
cmake -DHB_CHECK=ON -DHB_DISABLE_TEST_PROGS=ON -Bbuild -H. -GNinja
|
||||||
|
ninja -Cbuild
|
||||||
|
|
||||||
|
# or "fswatch -0 . -e build/ -e .git"
|
||||||
|
find src/ | entr printf '\0' | while read -d "" event; do
|
||||||
|
clear
|
||||||
|
ninja -Cbuild
|
||||||
|
build/hb-shape $@
|
||||||
|
build/hb-view $@
|
||||||
|
done
|
||||||
|
|
||||||
|
cmake -DHB_CHECK=ON -DHB_DISABLE_TEST_PROGS=OFF -Bbuild -H. -GNinja
|
||||||
|
ninja -Cbuild
|
||||||
|
CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=8 ninja -Cbuild test
|
|
@ -1,4 +1,4 @@
|
||||||
if (HB_HAVE_GLIB)
|
if (HB_HAVE_GLIB AND NOT HB_DISABLE_TEST_PROGS)
|
||||||
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
|
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am" MAKEFILEAM)
|
||||||
extract_make_variable (TEST_PROGS ${MAKEFILEAM})
|
extract_make_variable (TEST_PROGS ${MAKEFILEAM})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue