Ticket #11169 (needs_info defect)
Make testcc.sh exit with an exit code of 1 if preprocessing a file fails.
|Reported by:||drkirkby||Owned by:|
|Authors:||David Kirkby||Merged in:|
Description (last modified by jdemeyer) (diff)
The script $SAGE_ROOT/spkg/bin/testcc.sh checks to see what C compiler the environment variable $CC is. But currently the script always exits with a 0, even if an error occurs.
This patch will correct that.
Note some forms of error will not be detected. If CC is defined as ls, then the code will try to list the C file, which will succeed without error. But the changes will allow one to check if a compiler is installed or not.
drkirkby@hawk:~$ export CC=cc drkirkby@hawk:~$ sage-4.7.alpha3/local/bin/testcc.sh $CC Sun_Studio drkirkby@hawk:~$ export CC=gcc drkirkby@hawk:~$ sage-4.7.alpha3/local/bin/testcc.sh $CC GCC drkirkby@hawk:~$ export CC=junk drkirkby@hawk:~$ sage-4.7.alpha3/local/bin/testcc.sh $CC Error - junk is not compiling a C file properly
Apply 11169_testcc.patch to the SAGE_ROOT repository.
- Status changed from new to needs_review
- Type changed from PLEASE CHANGE to defect
- Status changed from needs_review to needs_info
- Status changed from needs_info to needs_review