Compare commits
3 Commits
74d9acecb5
...
9aac2511d3
Author | SHA1 | Date | |
---|---|---|---|
9aac2511d3 | |||
8af337c83c | |||
951208c15b |
@ -305,7 +305,7 @@ foreach (dict_script ${dicts_scripts})
|
||||
list (APPEND dicts_targets "dicts-${dict_name}")
|
||||
add_custom_target (dicts-${dict_name}
|
||||
COMMAND sh -c "PATH=.:$PATH \"$0\"" "${dict_script}"
|
||||
DEPENDS tabfile
|
||||
DEPENDS tdv-tabfile
|
||||
COMMENT "Generating sample dictionary ${dict_name}"
|
||||
VERBATIM)
|
||||
endforeach ()
|
||||
@ -380,14 +380,12 @@ endif ()
|
||||
|
||||
# Do some unit tests
|
||||
option (BUILD_TESTING "Build tests" OFF)
|
||||
set (project_tests stardict)
|
||||
|
||||
if (BUILD_TESTING)
|
||||
enable_testing ()
|
||||
|
||||
find_program (xmlwf_EXECUTABLE xmlwf)
|
||||
find_program (xmllint_EXECUTABLE xmllint)
|
||||
foreach (xml ${PROJECT_NAME}.xml)
|
||||
foreach (xml ${PROJECT_NAME}.xml ${PROJECT_NAME}.svg)
|
||||
if (xmlwf_EXECUTABLE)
|
||||
add_test (test-xmlwf-${xml} ${xmlwf_EXECUTABLE}
|
||||
${PROJECT_SOURCE_DIR}/${xml})
|
||||
@ -398,7 +396,15 @@ if (BUILD_TESTING)
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
foreach (name ${project_tests})
|
||||
find_program (dfv_EXECUTABLE desktop-file-validate)
|
||||
if (dfv_EXECUTABLE)
|
||||
foreach (df ${PROJECT_NAME}.desktop)
|
||||
add_test (test-dfv-${df} ${dfv_EXECUTABLE}
|
||||
${PROJECT_SOURCE_DIR}/${df})
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
foreach (name stardict)
|
||||
add_executable (test-${name}
|
||||
src/test-${name}.c ${project_common_sources})
|
||||
target_link_libraries (test-${name} ${project_common_libraries})
|
||||
|
@ -27,7 +27,8 @@ fetch() {
|
||||
} BEGIN { while ((getline < "db.tsv") > 0) {
|
||||
filenames[$1] = $2; deps[$1] = ""; for (i = 3; i <= NF; i++) {
|
||||
gsub(/[<=>].*/, "", $i); deps[$1] = deps[$1] $i FS }
|
||||
} for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | while IFS= read -r name
|
||||
} for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | tee db.want | \
|
||||
while IFS= read -r name
|
||||
do
|
||||
status Fetching "$name"
|
||||
[ -f "packages/$name" ] || curl -#o "packages/$name" "$repository/$name"
|
||||
@ -44,9 +45,9 @@ extract() {
|
||||
for subdir in *
|
||||
do [ -d "$subdir" -a "$subdir" != packages ] && rm -rf -- "$subdir"
|
||||
done
|
||||
for i in packages/*
|
||||
do bsdtar -xf "$i" --strip-components 1 mingw64
|
||||
done
|
||||
while IFS= read -r name
|
||||
do bsdtar -xf "packages/$name" --strip-components 1
|
||||
done < db.want
|
||||
}
|
||||
|
||||
configure() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user