texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Sat, 16 Nov 2024 11:45:11 -0500 (EST)

branch: master
commit a1e8832ef56932deb90d504d606436934e3540ac
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Nov 16 16:38:16 2024 +0000

    Eliminate non-ASCII file names from tarball
    
    * tp/tests/Makefile.am (input/non_ascii.tar): Rule to create
    tar file of all files under input/non_ascii with non-ASCII
    file names.
    
    (check_DATA): Extract this tar file under built_input in build
    directory.
    
    (EXTRA_DIST): Distribute non_ascii.tar but not files used to
    build it.
    
    * tp/tests/run_parser_all.sh,
    * tp/tests/encoded/list-of-tests,
    * tp/tests/tex_html/list-of-tests,
    * tp/tests/many_input_files/input_dir_non_ascii.sh: access
    these files in new location under builddir.
    
    Files with non-ASCII names can be difficult to handle on
    unusual platforms, such as being difficult to delete on MS-Windows
    (report from Eli).  They remain tracked in git.
---
 .gitignore                                       |  1 +
 ChangeLog                                        | 24 ++++++++++++++++++++++++
 tp/tests/Makefile.am                             | 22 +++++++++++++++++-----
 tp/tests/encoded/list-of-tests                   | 14 +++++++-------
 tp/tests/many_input_files/input_dir_non_ascii.sh |  2 +-
 tp/tests/run_parser_all.sh                       |  8 ++++++--
 tp/tests/tex_html/list-of-tests                  |  4 ++--
 7 files changed, 58 insertions(+), 17 deletions(-)

diff --git a/.gitignore b/.gitignore
index e432257e75..b58257fb3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -275,6 +275,7 @@ tp/tests/test_scripts/*.log
 tp/tests/test_scripts/*.trs
 tp/tests/input_file_names_recoded_stamp.txt
 tp/tests/built_input
+tp/tests/input/non_ascii.tar
 
 tp/tests/many_input_files/different_encodings
 tp/tests/many_input_files/different_languages_gen_master_menu
diff --git a/ChangeLog b/ChangeLog
index 0b77093d16..b73e47b639 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2024-11-16  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Eliminate non-ASCII file names from tarball
+
+       * tp/tests/Makefile.am (input/non_ascii.tar): Rule to create
+       tar file of all files under input/non_ascii with non-ASCII
+       file names.
+
+       (check_DATA): Extract this tar file under built_input in build
+       directory.
+
+       (EXTRA_DIST): Distribute non_ascii.tar but not files used to
+       build it.
+
+       * tp/tests/run_parser_all.sh,
+       * tp/tests/encoded/list-of-tests,
+       * tp/tests/tex_html/list-of-tests,
+       * tp/tests/many_input_files/input_dir_non_ascii.sh: access
+       these files in new location under builddir.
+
+       Files with non-ASCII names can be difficult to handle on
+       unusual platforms, such as being difficult to delete on MS-Windows
+       (report from Eli).  They remain tracked in git.
+
 2024-11-16  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/ConvertXS.xs
diff --git a/tp/tests/Makefile.am b/tp/tests/Makefile.am
index 48970de602..9b3f277414 100644
--- a/tp/tests/Makefile.am
+++ b/tp/tests/Makefile.am
@@ -72,13 +72,9 @@ input_file_names_recoded_stamp.txt: 
$(srcdir)/input/included_latin1.texi
 distclean-local:
        rm -rf input_file_names_recoded_stamp.txt built_input
 
-EXTRA_DIST = run_parser_all.sh parser_tests.sh escape_file_names.pl \
- $(one_test_files_generated_list) coverage_macro.texi \
- input/included_latin1.texi
-
 # Files with non-ASCII file names
 na=input/non_ascii
-EXTRA_DIST += \
+non_ascii_input = \
  $(na)/osé_utf8.texi \
  $(na)/osé_utf8_no_setfilename.texi \
  $(na)/çss.css \
@@ -89,3 +85,19 @@ EXTRA_DIST += \
  $(na)/tex_encodé_utf8.texi \
  $(na)/dir_înclùde/file_image.png \
  $(na)/dir_înclùde/included_file.texi
+
+# tar archive should contain all files in a "non_ascii" directory
+$(srcdir)/input/non_ascii.tar:
+       cd $(srcdir)/input && \
+       tar -c -f non_ascii.tar non_ascii
+
+check_DATA += built_input/non_ascii
+built_input/non_ascii: input/non_ascii.tar
+       rm -rf $@ && mkdir -p $@ && \
+       cd built_input && \
+       tar -xm -f "$(abs_srcdir)/input/non_ascii.tar"
+# tar -m discards file modification dates from the archive.
+
+EXTRA_DIST = run_parser_all.sh parser_tests.sh escape_file_names.pl \
+ $(one_test_files_generated_list) coverage_macro.texi \
+ input/included_latin1.texi input/non_ascii.tar
diff --git a/tp/tests/encoded/list-of-tests b/tp/tests/encoded/list-of-tests
index 61bb047c58..f93ad83c6f 100644
--- a/tp/tests/encoded/list-of-tests
+++ b/tp/tests/encoded/list-of-tests
@@ -18,23 +18,23 @@
 # for all the tests.
 
 # check non ascii in verbatiminclude file name
-#no_command_line_encoding ../input/non_ascii/osé_utf8.texi --html
+#no_command_line_encoding built_input/non_ascii/osé_utf8.texi --html
 
 # check non ascii command line arguments and css files
-non_ascii_command_line ../input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' --html --no-split -c 
DO_ABOUT=1 -c COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 --split=Mekanïk --document-language=Destruktïw 
-c 'Kommandöh vâl' -D TÛT -D 'vùr ké' -U ôndef -c 'FORMAT_MENU mînù' 
--macro-expand=@OUT_DIR@osé-texinfo.texi --internal-links=@OUT_DIR@intérnal.txt 
--css-include çss.css --css-include cêss.css --css-ref=rëf --c [...]
+non_ascii_command_line built_input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' --html --no-split -c 
DO_ABOUT=1 -c COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 --split=Mekanïk --document-language=Destruktïw 
-c 'Kommandöh vâl' -D TÛT -D 'vùr ké' -U ôndef -c 'FORMAT_MENU mînù' 
--macro-expand=@OUT_DIR@osé-texinfo.texi --internal-links=@OUT_DIR@intérnal.txt 
--css-include çss.css --css-include cêss.css --css-ref=rëf  [...]
 
 # test for the copying of image with non ascii characters for epub
-non_ascii_test_epub ../input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 --init epub3.pm -c 'EPUB_CREATE_CONTAINER_FILE 
0'
+non_ascii_test_epub built_input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 --init epub3.pm -c 'EPUB_CREATE_CONTAINER_FILE 
0'
 
 # check that the output is right when based on @setfilename
-non_ascii_test_rawtext ../input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 -c 
TEXINFO_OUTPUT_FORMAT=rawtext
+non_ascii_test_rawtext built_input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 -c 
TEXINFO_OUTPUT_FORMAT=rawtext
 
 # check that the output is right when based on input file name
-non_ascii_no_setfilename_test_rawtext 
../input/non_ascii/osé_utf8_no_setfilename.texi -D 'needcommandlineunicode Need 
command-line unicode' -c COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 
-c OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 -c 
TEXINFO_OUTPUT_FORMAT=rawtext
+non_ascii_no_setfilename_test_rawtext 
built_input/non_ascii/osé_utf8_no_setfilename.texi -D 'needcommandlineunicode 
Need command-line unicode' -c COMMAND_LINE_ENCODING=UTF-8 -c 
MESSAGE_ENCODING=UTF-8 -c OUTPUT_FILE_NAME_ENCODING=UTF-8 -c 
INPUT_FILE_NAME_ENCODING=UTF-8 -c TEXINFO_OUTPUT_FORMAT=rawtext
 
-non_ascii_test_info ../input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 --info
+non_ascii_test_info built_input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 --info
 
-non_ascii_test_latex ../input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 --latex
+non_ascii_test_latex built_input/non_ascii/osé_utf8.texi -D 
'needcommandlineunicode Need command-line unicode' -c 
COMMAND_LINE_ENCODING=UTF-8 -c MESSAGE_ENCODING=UTF-8 -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 --latex
 
 # test of non utf8 encoded file name in non utf8 document
 # "Need recoded file names" string is used in test driving script
diff --git a/tp/tests/many_input_files/input_dir_non_ascii.sh 
b/tp/tests/many_input_files/input_dir_non_ascii.sh
index 5c745b0d5e..3238ad1ff5 100755
--- a/tp/tests/many_input_files/input_dir_non_ascii.sh
+++ b/tp/tests/many_input_files/input_dir_non_ascii.sh
@@ -44,7 +44,7 @@ raw_outdir=$raw_output_dir/$basename
 mkdir $basename
 : > $basename/$stdout_file
 
-cmd="$prepended_command $PERL -I $srcdir/../.. -w $srcdir/../../texi2any.pl 
--html --no-split --set-customization-variable 'TEST 1' -I 
$srcdir/../input/non_ascii/dir_înclùde --conf-dir $srcdir/../../init --out 
$basename/ $srcdir/input_files/simple_including_file.texi --force >> 
$basename/$stdout_file 2>$basename/${basename}.2"
+cmd="$prepended_command $PERL -I $srcdir/../.. -w $srcdir/../../texi2any.pl 
--html --no-split --set-customization-variable 'TEST 1' -I 
../built_input/non_ascii/dir_înclùde --conf-dir $srcdir/../../init --out 
$basename/ $srcdir/input_files/simple_including_file.texi --force >> 
$basename/$stdout_file 2>$basename/${basename}.2"
 echo "$cmd" >> $logfile
 eval $cmd
 
diff --git a/tp/tests/run_parser_all.sh b/tp/tests/run_parser_all.sh
index 574dfbd3ba..371aff0339 100755
--- a/tp/tests/run_parser_all.sh
+++ b/tp/tests/run_parser_all.sh
@@ -378,7 +378,11 @@ while read line; do
   basename=`basename $file .texi`
   #remaining=`echo $line | sed 's/[a-zA-Z0-9_./-]*  *[a-zA-Z0-9_./-]* *//'`
   remaining=`echo $line | sed 's/[a-zA-Z0-9_é./-]*  *[a-zA-Z0-9_é./-]* *//'`
-  src_file="$srcdir/$testdir/$file"
+
+  case $file in
+      built_input/*) src_file="$file" ;;
+      *)             src_file="$srcdir/$testdir/$file" ;;
+  esac
 
   for command_dir in $commands; do
     format_option=
@@ -431,7 +435,7 @@ while read line; do
     mkdir "${outdir}$dir"
     remaining_out_dir=`echo $remaining | sed 
's,@OUT_DIR@,'"${outdir}$dir/"',g'`
     echo "$command $dir -> ${outdir}$dir" >> $logfile
-    cmd="$prepended_command $PERL -w $command_run $format_option --force 
--conf-dir $srcdir/../t/init/ --conf-dir $srcdir/../init --conf-dir 
$srcdir/../ext -I $srcdir/$testdir -I $testdir/ -I $srcdir/ -I . -I built_input 
-I $srcdir/input/non_ascii --error-limit=1000 -c TEST=1 $l2h_flags --output 
${outdir}$dir/ $remaining_out_dir $src_file > ${outdir}$dir/$basename.1 
2>${outdir}$dir/$basename.2"
+    cmd="$prepended_command $PERL -w $command_run $format_option --force 
--conf-dir $srcdir/../t/init/ --conf-dir $srcdir/../init --conf-dir 
$srcdir/../ext -I $srcdir/$testdir -I $testdir/ -I $srcdir/ -I . -I built_input 
-I built_input/non_ascii --error-limit=1000 -c TEST=1 $l2h_flags --output 
${outdir}$dir/ $remaining_out_dir $src_file > ${outdir}$dir/$basename.1 
2>${outdir}$dir/$basename.2"
     echo "$cmd" >>$logfile
     eval $cmd
     ret=$?
diff --git a/tp/tests/tex_html/list-of-tests b/tp/tests/tex_html/list-of-tests
index 9fc4bbab0f..7285b8c477 100644
--- a/tp/tests/tex_html/list-of-tests
+++ b/tp/tests/tex_html/list-of-tests
@@ -27,8 +27,8 @@ tex_eqalign_l2h tex_eqalign.texi --html --no-split -c 
'HTML_MATH l2h' --iftex
 math_not_closed math_not_closed.texi --html --no-split -c 'HTML_MATH l2h' 
--iftex
 tex_not_closed tex_not_closed.texi --html --no-split -c 'HTML_MATH l2h' --iftex
 tex_in_copying tex_in_copying.texi --html --no-split -c 'HTML_MATH l2h' --iftex
-tex_encoded_utf8_l2h ../input/non_ascii/tex_encodé_utf8.texi --html --no-split 
-c 'HTML_MATH l2h' --iftex -c 'COMMAND_LINE_ENCODING UTF-8' -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8
-tex_encoded_utf8_httex ../input/non_ascii/tex_encodé_utf8.texi --html 
--no-split --init tex4ht.pm --iftex -c 'COMMAND_LINE_ENCODING UTF-8' -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8
+tex_encoded_utf8_l2h built_input/non_ascii/tex_encodé_utf8.texi --html 
--no-split -c 'HTML_MATH l2h' --iftex -c 'COMMAND_LINE_ENCODING UTF-8' -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8
+tex_encoded_utf8_httex built_input/non_ascii/tex_encodé_utf8.texi --html 
--no-split --init tex4ht.pm --iftex -c 'COMMAND_LINE_ENCODING UTF-8' -c 
OUTPUT_FILE_NAME_ENCODING=UTF-8
 tex_encoded_latin1_l2h tex_encode_latin1.texi --html --no-split -c 'HTML_MATH 
l2h' --iftex
 tex_encoded_latin1_httex tex_encode_latin1.texi --html --no-split --init 
tex4ht.pm --iftex
 formatting_singular ../coverage/formatting.texi -c 'TEXI2HTML=1' -D 
'needcollationcompat Need collation compatibility' --init-file 
t2h_singular.init -c 'HTML_MATH l2h' -c 'EXTENSION htm' -c 'PREFIX sing' -c 
'TOP_FILE index.htm' --no-verbose



reply via email to

[Prev in Thread] Current Thread [Next in Thread]