Skip to content

Commit 00abf9b

Browse files
committed
fix(build): Fix distribution of unit tests clean up dist file list
1 parent e86acf0 commit 00abf9b

File tree

2 files changed

+35
-22
lines changed

2 files changed

+35
-22
lines changed

build-aux/list-dist-files.sh.in

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,54 @@
1-
#!/usr/bin/env sh
1+
#!@SHELL@
22
set -e
33

4+
alias find="${FIND:-@FIND@}"
5+
alias grep="${GREP:-@GREP@}"
6+
alias sed="${SED:-@SED@}"
7+
alias sort="${SORT:-@SORT@}"
8+
alias xargs="${XARGS:-@XARGS@}"
9+
410
finder () {
5-
test -d "$1" || return 0
6-
@FIND@ "$@" -type f | sort -bdi | xargs printf ' %s'
11+
test -d "$1" || return 1
12+
find "$@" -type f | am_list
13+
}
14+
15+
am_list () {
16+
sed -e 's#^\./##' | sort -bdi | xargs printf ' \\\n\t%s'
717
}
818

9-
printf '%s' "SILEDATA ="
19+
printf '%s =' SILEDATA
1020
finder core -name '*.lua' -not -name '*_spec.lua' -not -name 'version.lua' -not -name 'features.lua' -not -name 'pathsetup.lua'
1121
finder classes inputters languages outputters packages shapers types typesetters pagebuilders -name '*.lua' -not -name '*_spec.lua'
1222
finder classes i18n packages -name '*.ftl'
1323
finder packages -name '*.svg'
1424

15-
printf '\n%s' "LUALIBRARIES ="
25+
printf '\n\n%s =' LUALIBRARIES
1626
finder lua-libraries -name '*.lua'
1727

18-
printf '\n%s' "LUAMODULES ="
28+
printf '\n\n%s =' LUAMODULES
1929
finder lua_modules -not -name "'*~'"
2030

21-
printf '\n%s' "_TESTSRCS :="
22-
finder tests -maxdepth 1 -name '*.sil'
23-
finder tests -maxdepth 1 -name '*.xml'
24-
finder tests -maxdepth 1 -name '*.lua'
25-
finder tests -maxdepth 1 -name '*.nil'
31+
printf '\n\n%s :=' _TESTSRCS
32+
{
33+
find tests -maxdepth 1 -name '*.sil' -type f
34+
find tests -maxdepth 1 -name '*.xml' -type f
35+
find tests -maxdepth 1 -name '*.lua' -type f
36+
find tests -maxdepth 1 -name '*.nil' -type f
37+
} |
38+
am_list
2639

27-
printf '\n%s' "_TESTPREVIEWS ?="
40+
printf '\n\n%s ?=' _TESTPREVIEWS
2841
{
29-
finder tests -maxdepth 1 -name '*.sil'
30-
finder tests -maxdepth 1 -name '*.xml'
31-
finder tests -maxdepth 1 -name '*.lua'
32-
finder tests -maxdepth 1 -name '*.nil'
42+
find tests -maxdepth 1 -name '*.sil' -type f
43+
find tests -maxdepth 1 -name '*.xml' -type f
44+
find tests -maxdepth 1 -name '*.lua' -type f
45+
find tests -maxdepth 1 -name '*.nil' -type f
3346
} |
34-
xargs @GREP@ -L KNOWNBAD |
35-
xargs printf ' %s'
47+
xargs grep -L KNOWNBAD |
48+
am_list
3649

37-
printf '\n%s' "BUSTEDSPECS ?="
38-
finder . -maxdepth 1 -name '*_spec.lua'
50+
printf '\n\n%s ?=' BUSTEDSPECS
51+
finder . -name '*_spec.lua'
3952

40-
printf '\n%s' "TESTEXPECTS ?="
53+
printf '\n\n%s ?=' TESTEXPECTS
4154
finder tests -maxdepth 1 -name '*.expected'

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ QUE_PROGVAR([cmp])
2424
QUE_PROGVAR([find])
2525
QUE_PROGVAR([jq])
2626
QUE_PROGVAR([pdfinfo])
27+
QUE_PROGVAR([sort])
2728
QUE_PROGVAR([xargs])
2829

2930
LT_PREREQ([2.2])
@@ -180,7 +181,6 @@ AM_COND_IF([DEVELOPER_MODE], [
180181
QUE_PROGVAR([nix])
181182
QUE_PROGVAR([npm])
182183
QUE_PROGVAR([perl])
183-
QUE_PROGVAR([sort])
184184
QUE_PROGVAR([stylua])
185185
QUE_PROGVAR([tr])
186186
])

0 commit comments

Comments
 (0)