Hello,
The tta/maintain/regenerate_cmd_tests.sh script generates
tta/tests/Makefile.onetst, which is included in tta/tests/Makefile.am.
There is a while loop reading from a file, with a redirection, in which a
global variable, $type_test_files is changed. The relevant code,
simplified, is like:
type_test_files=
...
while read line ; do
...
name_prepended=...
name=...
one_test_file="test_scripts/${name_prepended}perl_$name.sh"
type_test_files="$type_test_files $one_test_file"
...
done < $driving_file
...
This script is called from autogen.sh, and in Solaris 10, the result is
incorrect, which seems to be a known issue of Solaris /bin/sh (before
Solaris 11), in which a subshell is started for while even without pipe:
https://unix.stackexchange.com/questions/137680/variable-scope-in-while-read-loop-on-solaris
tta/maintain/regenerate_cmd_tests.sh is also called from tta/tests/Makefile.am,
but in that case $SHELL is used, which is found by configure and is
another shell that /bin/sh, so the issue does not materialize in that
case.
I see two ways to solve this issue
1) use a trick to get the code above to work on Solaris 10 /bin/sh. I
have no idea how to do that, do not hesitate if you have an idea
2) the call in tta/tests/Makefile.am depends on the script itself, so
another possibility is to create an empty file in autogen.sh, with a
date in the past, which makes sure that tta/maintain/regenerate_cmd_tests.sh
is invoked from tta/tests/Makefile.am.
Something like:
cmd="echo '#empty file supposed to be recreated' > tta/tests/Makefile.onetst;
touch -t 200001010000 tta/tests/Makefile.onetst"
echo " $cmd"
$chicken eval $cmd || exit 1
Advices, ideas?
--
Pat