You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
611 B
35 lines
611 B
#!/bin/sh
|
|
# Author: Pablo Greco <pablo@fliagreco.com.ar>
|
|
|
|
t_Log "Running $0 - gcc-gnat can build a hello.adb"
|
|
|
|
if [ "$centos_ver" -ne 7 ] ; then
|
|
t_Log "CentOS $centos_ver -> SKIP"
|
|
exit 0
|
|
fi
|
|
|
|
# creating source code
|
|
pushd '/var/tmp' >/dev/null
|
|
FILE='/var/tmp/gcctesthello.adb'
|
|
EXE='/var/tmp/gcctesthello'
|
|
|
|
cat > $FILE <<EOF
|
|
with Ada.Text_IO;
|
|
|
|
procedure GccTestHello is
|
|
begin
|
|
Ada.Text_IO.Put_Line("hello, centos!");
|
|
end GccTestHello;
|
|
EOF
|
|
|
|
# Executing gcc
|
|
gnat make -o $EXE $FILE
|
|
|
|
# run EXE
|
|
$EXE |grep -q 'hello, centos'
|
|
t_CheckExitStatus $?
|
|
|
|
# remove files
|
|
/bin/rm $FILE $EXE $EXE.ali $EXE.o
|
|
popd >/dev/null
|