bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone
Blob Blame History Raw
#!/bin/sh
# Author: Pablo Greco <pablo@fliagreco.com.ar>

t_Log "Running $0 - gcc-gnat can build a hello.adb"

# 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