Skip to content

Commit

Permalink
fix(build): Fix distribution of unit tests clean up dist file list
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Aug 20, 2024
1 parent e86acf0 commit 00abf9b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 22 deletions.
55 changes: 34 additions & 21 deletions build-aux/list-dist-files.sh.in
Original file line number Diff line number Diff line change
@@ -1,41 +1,54 @@
#!/usr/bin/env sh
#!@SHELL@
set -e

alias find="${FIND:-@FIND@}"
alias grep="${GREP:-@GREP@}"
alias sed="${SED:-@SED@}"
alias sort="${SORT:-@SORT@}"
alias xargs="${XARGS:-@XARGS@}"

finder () {
test -d "$1" || return 0
@FIND@ "$@" -type f | sort -bdi | xargs printf ' %s'
test -d "$1" || return 1
find "$@" -type f | am_list
}

am_list () {
sed -e 's#^\./##' | sort -bdi | xargs printf ' \\\n\t%s'
}

printf '%s' "SILEDATA ="
printf '%s =' SILEDATA
finder core -name '*.lua' -not -name '*_spec.lua' -not -name 'version.lua' -not -name 'features.lua' -not -name 'pathsetup.lua'
finder classes inputters languages outputters packages shapers types typesetters pagebuilders -name '*.lua' -not -name '*_spec.lua'
finder classes i18n packages -name '*.ftl'
finder packages -name '*.svg'

printf '\n%s' "LUALIBRARIES ="
printf '\n\n%s =' LUALIBRARIES
finder lua-libraries -name '*.lua'

printf '\n%s' "LUAMODULES ="
printf '\n\n%s =' LUAMODULES
finder lua_modules -not -name "'*~'"

printf '\n%s' "_TESTSRCS :="
finder tests -maxdepth 1 -name '*.sil'
finder tests -maxdepth 1 -name '*.xml'
finder tests -maxdepth 1 -name '*.lua'
finder tests -maxdepth 1 -name '*.nil'
printf '\n\n%s :=' _TESTSRCS
{
find tests -maxdepth 1 -name '*.sil' -type f
find tests -maxdepth 1 -name '*.xml' -type f
find tests -maxdepth 1 -name '*.lua' -type f
find tests -maxdepth 1 -name '*.nil' -type f
} |
am_list

printf '\n%s' "_TESTPREVIEWS ?="
printf '\n\n%s ?=' _TESTPREVIEWS
{
finder tests -maxdepth 1 -name '*.sil'
finder tests -maxdepth 1 -name '*.xml'
finder tests -maxdepth 1 -name '*.lua'
finder tests -maxdepth 1 -name '*.nil'
find tests -maxdepth 1 -name '*.sil' -type f
find tests -maxdepth 1 -name '*.xml' -type f
find tests -maxdepth 1 -name '*.lua' -type f
find tests -maxdepth 1 -name '*.nil' -type f
} |
xargs @GREP@ -L KNOWNBAD |
xargs printf ' %s'
xargs grep -L KNOWNBAD |
am_list

printf '\n%s' "BUSTEDSPECS ?="
finder . -maxdepth 1 -name '*_spec.lua'
printf '\n\n%s ?=' BUSTEDSPECS
finder . -name '*_spec.lua'

printf '\n%s' "TESTEXPECTS ?="
printf '\n\n%s ?=' TESTEXPECTS
finder tests -maxdepth 1 -name '*.expected'
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ QUE_PROGVAR([cmp])
QUE_PROGVAR([find])
QUE_PROGVAR([jq])
QUE_PROGVAR([pdfinfo])
QUE_PROGVAR([sort])
QUE_PROGVAR([xargs])

LT_PREREQ([2.2])
Expand Down Expand Up @@ -180,7 +181,6 @@ AM_COND_IF([DEVELOPER_MODE], [
QUE_PROGVAR([nix])
QUE_PROGVAR([npm])
QUE_PROGVAR([perl])
QUE_PROGVAR([sort])
QUE_PROGVAR([stylua])
QUE_PROGVAR([tr])
])
Expand Down

0 comments on commit 00abf9b

Please sign in to comment.