Compare commits

...

3 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 9aac2511d3
Win64Depends.sh: only extract what we need
In case the packages directory has been preloaded or symlinked.
2023-06-26 20:57:56 +02:00
Přemysl Eric Janouch 8af337c83c
CMakeLists.txt: fix dependencies after renaming 2023-06-22 00:23:29 +02:00
Přemysl Eric Janouch 951208c15b
Test SVG and desktop file validity 2023-06-15 16:24:16 +02:00
2 changed files with 16 additions and 9 deletions

View File

@ -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})

View File

@ -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() {