Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
72bec1cd
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
72bec1cd
编写于
1月 05, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
1月 05, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve tests (#679)
上级
293e4435
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
62 addition
and
22 deletion
+62
-22
.circleci/config.yml
.circleci/config.yml
+1
-1
CMakeLists.txt
CMakeLists.txt
+41
-11
autogen.sh
autogen.sh
+4
-2
src/Makefile.am
src/Makefile.am
+1
-2
src/check-defs.sh
src/check-defs.sh
+1
-1
src/check-header-guards.sh
src/check-header-guards.sh
+1
-1
src/check-libstdc++.sh
src/check-libstdc++.sh
+1
-1
src/check-static-inits.sh
src/check-static-inits.sh
+1
-1
src/check-symbols.sh
src/check-symbols.sh
+1
-1
test/fuzzing/CMakeLists.txt
test/fuzzing/CMakeLists.txt
+10
-1
未找到文件。
.circleci/config.yml
浏览文件 @
72bec1cd
...
...
@@ -59,7 +59,7 @@ jobs:
-
checkout
-
run
:
apt update && apt install -y pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev
-
run
:
./autogen.sh && make distcheck
-
run
:
make distdir && cd harfbuzz-* && cmake -D
HB_HAVE_FREETYPE=ON -DHB_HAVE_GLIB=ON -DHB_BUILD_UTILS
=ON -Bbuild -H. -GNinja && ninja -Cbuild && CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test && ninja -Cbuild install
-
run
:
make distdir && cd harfbuzz-* && cmake -D
DHB_CHECK
=ON -Bbuild -H. -GNinja && ninja -Cbuild && CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test && ninja -Cbuild install
psvita
:
docker
:
...
...
CMakeLists.txt
浏览文件 @
72bec1cd
...
...
@@ -61,6 +61,25 @@ if (HB_HAVE_INTROSPECTION)
set
(
HB_HAVE_GLIB ON
)
endif
()
option
(
HB_CHECK OFF
"Do a configuration suitable for testing (shared library and enable all options)"
)
if
(
HB_CHECK
)
set
(
BUILD_SHARED_LIBS ON
)
set
(
HB_BUILD_UTILS ON
)
set
(
HB_BUILTIN_UCDN ON
)
set
(
HB_HAVE_ICU
)
set
(
HB_HAVE_GLIB ON
)
#set (HB_HAVE_GOBJECT ON)
#set (HB_HAVE_INTROSPECTION ON)
set
(
HB_HAVE_FREETYPE ON
)
set
(
HB_HAVE_GRAPHITE2 ON
)
if
(
WIN32
)
set
(
HB_HAVE_UNISCRIBE ON
)
set
(
HB_HAVE_DIRECTWRITE ON
)
elseif
(
APPLE
)
set
(
HB_HAVE_CORETEXT ON
)
endif
()
endif
()
include_directories
(
AFTER
${
PROJECT_SOURCE_DIR
}
/src
${
PROJECT_BINARY_DIR
}
/src
...
...
@@ -71,6 +90,9 @@ add_definitions(-DHAVE_FALLBACK)
if
(
BUILD_SHARED_LIBS
)
add_definitions
(
-DHAVE_ATEXIT
)
if
(
APPLE
)
set
(
CMAKE_MACOSX_RPATH ON
)
endif
()
endif
()
if
(
MSVC
)
...
...
@@ -710,23 +732,31 @@ if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
endif
()
endif
()
## Tests
if
(
UNIX
)
if
(
BUILD_SHARED_LIBS
)
add_test
(
NAME check-static-inits.sh
COMMAND
${
PROJECT_SOURCE_DIR
}
/src/check-static-inits.sh
WORKING_DIRECTORY
${
PROJECT_BINARY_DIR
}
/CMakeFiles/harfbuzz.dir/src
# hack
)
# does some "make" stuff inside
# add_test(NAME check-defs.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-defs.sh)
add_test
(
NAME check-libstdc++.sh COMMAND
${
PROJECT_SOURCE_DIR
}
/src/check-libstdc++.sh
)
add_test
(
NAME check-symbols.sh COMMAND
${
PROJECT_SOURCE_DIR
}
/src/check-symbols.sh
)
#add_test(NAME check-defs.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-defs.sh)
#set_tests_properties(check-defs.sh PROPERTIES ENVIRONMENT "libs=.")
# broken on cmake builds right now :(
#add_test(NAME check-symbols.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-symbols.sh)
#add_test(NAME check-libstdc++.sh COMMAND ${PROJECT_SOURCE_DIR}/src/check-libstdc++.sh)
#set_tests_properties(check-symbols.sh check-libstdc++.sh PROPERTIES ENVIRONMENT "libs=.")
if
(
NOT APPLE
)
add_test
(
NAME check-static-inits.sh
COMMAND
${
PROJECT_SOURCE_DIR
}
/src/check-static-inits.sh
WORKING_DIRECTORY
${
PROJECT_BINARY_DIR
}
/CMakeFiles/harfbuzz.dir/src
# ugly hack
)
set_tests_properties
(
check-static-inits.sh PROPERTIES ENVIRONMENT
"libs=."
)
endif
()
else
()
message
(
WARN
"
You can e
nable BUILD_SHARED_LIBS for more tests."
)
message
(
WARN
"
E
nable BUILD_SHARED_LIBS for more tests."
)
endif
()
# disabled as it doesn't work anyway
if
(
OFF AND IN_HB_DIST
)
if
(
IN_HB_DIST
)
add_test
(
NAME check-c-linkage-decls.sh COMMAND ./check-c-linkage-decls.sh WORKING_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/src
)
add_test
(
NAME check-header-guards.sh COMMAND ./check-header-guards.sh WORKING_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/src
)
endif
()
...
...
@@ -737,4 +767,4 @@ endif ()
# Needs to come last so that variables defined above are passed to
# subdirectories.
add_subdirectory
(
test
)
add_subdirectory
(
test
)
\ No newline at end of file
autogen.sh
浏览文件 @
72bec1cd
...
...
@@ -42,5 +42,7 @@ echo "running autoreconf --force --install --verbose"
autoreconf
--force
--install
--verbose
||
exit
$?
cd
$olddir
echo
"running configure
$@
"
test
-n
"
$NOCONFIGURE
"
||
"
$srcdir
/configure"
"
$@
"
test
-n
"
$NOCONFIGURE
"
||
{
echo
"running configure
$@
"
"
$srcdir
/configure"
"
$@
"
}
src/Makefile.am
浏览文件 @
72bec1cd
...
...
@@ -134,7 +134,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA
=
harfbuzz.pc
EXTRA_DIST
+=
harfbuzz.pc.in
FUZZING_CPPFLAGS
=
\
FUZZING_CPPFLAGS
=
\
-DHB_NDEBUG
\
-DHB_MAX_NESTING_LEVEL
=
3
\
-DHB_SANITIZE_MAX_EDITS
=
3
\
...
...
@@ -324,7 +324,6 @@ test_ot_tag_LDADD = libharfbuzz.la $(HBLIBS)
TESTS
=
$(dist_check_SCRIPTS)
$(check_PROGRAMS)
TESTS_ENVIRONMENT
=
\
srcdir
=
"
$(srcdir)
"
\
libs
=
".libs"
\
MAKE
=
"
$(MAKE)
$(AM_MAKEFLAGS)
"
\
HBSOURCES
=
"
$(HBSOURCES)
"
\
HBHEADERS
=
"
$(HBHEADERS)
$(HBNODISTHEADERS)
"
\
...
...
src/check-defs.sh
浏览文件 @
72bec1cd
...
...
@@ -4,7 +4,7 @@ LC_ALL=C
export
LC_ALL
test
-z
"
$srcdir
"
&&
srcdir
=
.
test
-z
"
$libs
"
&&
libs
=
.
test
-z
"
$libs
"
&&
libs
=
.
libs
test
-z
"
$MAKE
"
&&
MAKE
=
make
stat
=
0
...
...
src/check-header-guards.sh
浏览文件 @
72bec1cd
...
...
@@ -6,7 +6,7 @@ export LC_ALL
test
-z
"
$srcdir
"
&&
srcdir
=
.
stat
=
0
test
"x
$HBHEADERS
"
=
x
&&
HBHEADERS
=
`
cd
"
$srcdir
"
;
find
.
-maxdepth
1
-name
'hb*.h'
`
test
"x
$HBHEADERS
"
=
x
&&
HBHEADERS
=
`
cd
"
$srcdir
"
;
find
.
-maxdepth
1
-name
'hb*.h'
!
-name
'hb-gobject-structs.h'
`
test
"x
$HBSOURCES
"
=
x
&&
HBSOURCES
=
`
cd
"
$srcdir
"
;
find
.
-maxdepth
1
-name
'hb-*.cc'
-or
-name
'hb-*.hh'
`
for
x
in
$HBHEADERS
$HBSOURCES
;
do
...
...
src/check-libstdc++.sh
浏览文件 @
72bec1cd
...
...
@@ -4,7 +4,7 @@ LC_ALL=C
export
LC_ALL
test
-z
"
$srcdir
"
&&
srcdir
=
.
test
-z
"
$libs
"
&&
libs
=
.
test
-z
"
$libs
"
&&
libs
=
.
libs
stat
=
0
...
...
src/check-static-inits.sh
浏览文件 @
72bec1cd
...
...
@@ -4,7 +4,7 @@ LC_ALL=C
export
LC_ALL
test
-z
"
$srcdir
"
&&
srcdir
=
.
test
-z
"
$libs
"
&&
libs
=
.
test
-z
"
$libs
"
&&
libs
=
.
libs
stat
=
0
...
...
src/check-symbols.sh
浏览文件 @
72bec1cd
...
...
@@ -4,7 +4,7 @@ LC_ALL=C
export
LC_ALL
test
-z
"
$srcdir
"
&&
srcdir
=
.
test
-z
"
$libs
"
&&
libs
=
.
test
-z
"
$libs
"
&&
libs
=
.
libs
stat
=
0
...
...
test/fuzzing/CMakeLists.txt
浏览文件 @
72bec1cd
if
(
HB_
HAVE_GLIB
)
if
(
HB_
CHECK
)
file
(
READ
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/Makefile.am"
MAKEFILEAM
)
extract_make_variable
(
hb_fuzzer_SOURCES
${
MAKEFILEAM
}
)
# TODO: enable these two
#extract_make_variable (FUZZING_CPPFLAGS ${MAKEFILEAM}) # extracting regex fail
#add_executable (hb-fuzzer # it should be run only after ragel execution
# ${project_sources} ${project_extra_sources} ${project_headers}
# ${hb_fuzzer_SOURCES})
add_executable
(
hb-fuzzer
${
hb_fuzzer_SOURCES
}
)
target_link_libraries
(
hb-fuzzer harfbuzz
)
target_compile_definitions
(
hb-fuzzer PUBLIC
${
FUZZING_CPPFLAGS
}
)
add_test
(
NAME hb-fuzzer
COMMAND python run-fuzzer-tests.py $<TARGET_FILE:hb-fuzzer>
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录