Skip to content

Commit

Permalink
Merge branch 'release-4.2'
Browse files Browse the repository at this point in the history
* release-4.2: (72 commits)
  Added a test for the suppression of \GreLastOfScore. Tests gregorio-project/gregorio#1205.
  Updated test harness to handle gregorio executable with version number. Tests gregorio-project/gregorio#1197.
  Updated tests to match the oriscus orientation at unison change. Tests gregorio-project/gregorio#1177.
  Small inconsistency
  Added a test to exercise per-line dimension changes. Tests gregorio-project/gregorio#1156.
  Accepted test results after merge.
  accept tests for fix-1144
  accept changes for #1169
  accept tests for 1146
  accept tests for #1146
  accept changes for fix-1138
  changes for fix-1137
  Accepted updated results after merging gregorio-project/gregorio#1154. Tests gregorio-project/gregorio#1153.
  Accepted updated results after merge of release-4.2 into fix-1155.
  accept changes for fix-1152
  add tests for 1155
  accept tests for fix-1155
  Accepted expectations after #1148. Tests gregorio-project/gregorio#1145.
  Added the test from gregorio-project/gregorio#1141.
  Added the test from gregorio-project/gregorio#1139.
  ...
  • Loading branch information
rpspringuel committed Sep 24, 2016
2 parents c4ed261 + ba6588e commit 3ccb375
Show file tree
Hide file tree
Showing 280 changed files with 4,825 additions and 1,948 deletions.
1 change: 1 addition & 0 deletions backwards/tex-output/parmesan/PopulusSion.gabc
Binary file added backwards/tex-output/parmesan/parmesan_B.pdf
Binary file not shown.
61 changes: 61 additions & 0 deletions backwards/tex-output/parmesan/parmesan_B.tex
@@ -0,0 +1,61 @@
% !TEX TS-program = lualatex
% !TEX encoding = UTF-8

% This is a simple template for a LuaLaTeX document using gregorio scores.

\documentclass[11pt]{article} % use larger type; default would be 10pt

% usual packages loading:
\usepackage{fontspec}
\usepackage{graphicx} % support the \includegraphics command and options
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{a4paper} % or letterpaper (US) or a5paper or....
\usepackage[allowdeprecated=true]{gregoriotex} % for gregorio score inclusion
\usepackage{fullpage} % to reduce the margins
\setmainfont[
Path = ../../../fonts/ ,
Extension = .otf ,
UprightFont = *-Regular ,
UprightFeatures = { SmallCapsFont = *SC-Regular } ,
BoldFont = *-Bold ,
BoldFeatures = { SmallCapsFont = *SC-Bold } ,
ItalicFont = *-Italic ,
ItalicFeatures = { SmallCapsFont = *SC-Italic } ,
BoldItalicFont = *-BoldItalic ,
BoldItalicFeatures = { SmallCapsFont = *SC-BoldItalic } ,
Ligatures = TeX
]{Alegreya}

% here we begin the document
\begin{document}

% The title:
\begin{center}\begin{huge}\textsc{Populus Sion}\end{huge}\end{center}

% Here we set the space around the initial.
% Please report to http://home.gna.org/gregorio/gregoriotex/details for more details and options
\grechangedim{afterinitialshift}{2.2mm}{scalable}
\grechangedim{beforeinitialshift}{2.2mm}{scalable}

% Here we set the initial font. Change 43 if you want a bigger initial.
\grechangestyle{initial}{%
\fontsize{43}{43}\selectfont%
}

% We set red lines here, comment it if you want black ones.
\gresetlinecolor{gregoriocolor}

% We set VII above the initial.
\grechangestyle{annotation}{\small\scshape\bfseries}
\greannotation{VII}

% We type a text in the top right corner of the score:
\grechangestyle{commentary}{\small\itshape}
\grecommentary{Cf. Is. 30, 19 . 30 ; Ps. 79}

\gresetgregoriofont{parmesan}

% and finally we include the score. The file must be in the same directory as this one.
\gregorioscore[a]{PopulusSion}

\end{document}
49 changes: 43 additions & 6 deletions gregorio-test.sh
Expand Up @@ -34,6 +34,8 @@
# DIFF_PDF string the command to use for a PDF diff; expands {expect}
# into the filename of the expected result and {output}
# into the filename of the actual result.
# PDF_DENSITY integer the dpi to use for the pdf comparison.
# SKIP_TESTS array tests to skip

export testroot="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
cd "$testroot"
Expand Down Expand Up @@ -276,6 +278,19 @@ then
C_RESET="$(tput sgr0 2>/dev/null)"
fi

declare -A tests_to_skip
typeof_SKIP_TESTS="$(declare -p SKIP_TESTS 2>/dev/null)"
if [[ "$typeof_SKIP_TESTS" = 'declare -a '* ]]
then
for t in $SKIP_TESTS
do
tests_to_skip[$t]=1
done
elif [[ "$typeof_SKIP_TESTS" = 'declare -- '* ]]
then
tests_to_skip[$SKIP_TESTS]=1
fi

source harness.sh

if [ ! -d tests ]
Expand All @@ -302,7 +317,10 @@ then
function filter {
while read line
do
echo $line
if [ "${tests_to_skip[$line]}" != "1" ]
then
echo $line
fi
done
}
else
Expand All @@ -320,7 +338,7 @@ else
function filter {
while read line
do
if [ "${tests_to_run[$line]}" = "1" ]
if [ "${tests_to_run[$line]}" = "1" -a "${tests_to_skip[$line]}" != "1" ]
then
echo $line
fi
Expand All @@ -341,9 +359,24 @@ test|retest)
$long_tests && $CP -Lr longtests/* output
$CP -Lr backwards/* output

if [ "$gregorio_dir" != "" ]
if [ "$gregorio_dir" = "" ]
then
if [ ! -f "$gregorio_dir/src/gregorio" -o ! -x "$gregorio_dir/src/gregorio" ]
gregorio_version=$(grep 'local gregorio_exe ' $(kpsewhich gregoriotex.lua))
gregorio_version=${gregorio_version#*\'gregorio-}
gregorio_version=${gregorio_version%\'*}
else
if [ ! -f "$gregorio_dir/.gregorio-version" -o \
! -r "$gregorio_dir/.gregorio-version" ]
then
echo "$gregorio_dir/.gregorio-version is not readable" >&2
exit 8
fi

gregorio_version="$(head -n 1 $gregorio_dir/.gregorio-version)"
gregorio_version="${gregorio_version//./_}"

if [ ! -f "$gregorio_dir/src/gregorio-${gregorio_version}" -o \
! -x "$gregorio_dir/src/gregorio-${gregorio_version}" ]
then
echo "$gregorio_dir/src/gregorio is not an executable" >&2
exit 8
Expand All @@ -358,7 +391,9 @@ test|retest)
export TEXMFCONFIG=$(realpath var/texmf-config)
export TEXMFVAR=$(realpath var/texmf-var)

if ! (cd "$gregorio_dir" && TEXHASH="texhash $TEXMFHOME" CP="rsync -Lci" ./install-gtex.sh user)
if ! (cd "$gregorio_dir" && TEXHASH="texhash $TEXMFHOME" \
CP="rsync -Lci" SKIP=docs,examples,font-sources \
./install-gtex.sh user)
then
echo "Unable to install GregorioTeX to $TEXMFHOME" >&2
exit 8
Expand All @@ -367,14 +402,16 @@ test|retest)
echo
fi

export gregorio=gregorio-$gregorio_version

if ! gregorio -F dump -S -s </dev/null 2>/dev/null | grep -q 'SCORE INFOS'
then
echo "Gregorio is not installed properly or is not statically linked" >&2
echo "When building, use ./configure --enable-all-static" >&2
exit 8
fi

echo "Gregorio = $(which gregorio)"
echo "Gregorio = $(which $gregorio)"
echo "GregorioTeX = $(kpsewhich gregoriotex.tex)"
echo

Expand Down
41 changes: 32 additions & 9 deletions harness.sh
Expand Up @@ -16,13 +16,14 @@

export PASS="${C_GOOD}PASS${C_RESET}"
export FAIL="${C_BAD}FAIL${C_RESET}"
export PDFLATEX='lualatex --shell-escape --debug-format --interaction=scrollmode'
export PDFLATEX="$testroot/run-lualatex.sh %D %O %S"
export PDF_DENSITY="${PDF_DENSITY:-300}"

if $use_valgrind
then
export gregorio='valgrind --leak-check=full --show-leak-kinds=all --suppressions="$testroot/kpathsea.valgrind.supp" --gen-suppressions=all --log-file="$filename.grind" gregorio'
export grind='valgrind --leak-check=full --show-leak-kinds=all --suppressions="$testroot/kpathsea.valgrind.supp" --gen-suppressions=all --log-file="$filename.grind"'
else
export gregorio='gregorio'
export grind=''
fi
export LSAN_OPTIONS="suppressions=$testroot/kpathsea.lsan.supp"

Expand Down Expand Up @@ -217,7 +218,14 @@ function gabc_gtex_test {
testing "$filename" "$filename.result" "gabc_gtex_clean '$filename'"

export TEXINPUTS="$(dirname "$filename"):"
if eval $gregorio -Wv -f gabc -F gtex -o "$outfile" -l "$logfile" "$filename"
if [[ "$filename" = *"_B"* ]]
then
deprecation=
else
deprecation=-D
fi
if eval $grind $gregorio -Wv $deprecation -f gabc -F gtex \
-o "$outfile" -l "$logfile" "$filename"
then
if [[ "$filename" == */should-fail/* ]]
then
Expand Down Expand Up @@ -283,7 +291,14 @@ function gabc_dump_test {
testing "$filename" "$filename.result" "gabc_dump_clean '$filename'"

export TEXINPUTS="$(dirname "$filename"):"
if eval $gregorio -Wv -f gabc -F dump -o "$outfile" -l "$logfile" "$filename"
if [[ "$filename" = *"_B"* ]]
then
deprecation=
else
deprecation=-D
fi
if eval $grind $gregorio -Wv $deprecation -f gabc -F dump \
-o "$outfile" -l "$logfile" "$filename"
then
if [[ "$filename" == */should-fail/* ]]
then
Expand Down Expand Up @@ -345,7 +360,14 @@ function gabc_gabc_test {
testing "$filename" "$filename.result" "gabc_gabc_clean '$filename'"

export TEXINPUTS="$(dirname "$filename"):"
if eval $gregorio -Wv -f gabc -F gabc -o "$outfile" -l "$logfile" "$filename"
if [[ "$filename" = *"_B"* ]]
then
deprecation=
else
deprecation=-D
fi
if eval $grind $gregorio -Wv $deprecation -f gabc -F gabc \
-o "$outfile" -l "$logfile" "$filename"
then
if [[ "$filename" == */should-fail/* ]]
then
Expand Down Expand Up @@ -462,8 +484,8 @@ function typeset_and_compare {
if $verify "$texfile"
then
if cd "$outdir" && mkdir expected && \
convert -density 150 "../$pdffile" expected/page.png && \
convert -density 150 "$pdffile" page.png
convert -density $PDF_DENSITY "../$pdffile" expected/page.png && \
convert -density $PDF_DENSITY "$pdffile" page.png
then
declare -a failed
for name in page*.png
Expand Down Expand Up @@ -589,7 +611,8 @@ function gabc_output_clean {
filebase="${filename%.gabc}"

clean_typeset_result "$filename" gabc
$RM -f "$filebase"-*.gtex "$filebase.tex"
$RM -f "$filebase"-*.gtex "$filebase"-*.glog "$filebase-preamble.tex" \
"$filebase.tex"
}
function gabc_output_accept {
accept_typeset_result "$1" gabc
Expand Down
2 changes: 1 addition & 1 deletion review-results.sh
Expand Up @@ -53,7 +53,7 @@ do
;;
*)
echo "Invalid choice"
action="-d"
action=${ACTION:--d}
;;
esac
done
Expand Down
28 changes: 28 additions & 0 deletions run-lualatex.sh
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

# Gregorio Tests - Script for lualatex processing
# Copyright (C) 2016 The Gregorio Project
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This script uses gregorio-test.sh to interactively review the results
# of the previously run test.

CP="${CP:-cp}"

output="$1"
shift
lualatex --shell-escape --debug-format --interaction=nonstopmode --halt-on-error --file-line-error "$@"
#"$CP" --preserve=timestamps --backup=numbered "$output" "${output%.pdf}.backup.pdf"
#"$CP" --preserve=timestamps --backup=numbered "${output%.pdf}.log" "${output%.pdf}.backup.log"

0 comments on commit 3ccb375

Please sign in to comment.