bstinson / centos / t_functional

Forked from centos/t_functional 3 years ago
Clone

Blame tests/p_python/10-test_python.sh

Christoph Galuschka 518959
#!/bin/sh
Christoph Galuschka 518959
# Author: Christoph Galuschka <christoph.galuschka@chello.at>
Christoph Galuschka 518959
#         Athmane Madjodj <athmanem@gmail.com>
Christoph Galuschka 518959
Christoph Galuschka 518959
t_Log "Running $0 - python can print Hello World"
Christoph Galuschka 518959
Christoph Galuschka 518959
# creating source file
Christoph Galuschka 518959
FILE='/var/tmp/python-test.py'
Christoph Galuschka 518959
Christoph Galuschka 518959
cat > $FILE <
Christoph Galuschka 518959
print "hello, centos!\n"
Christoph Galuschka 518959
EOF
Christoph Galuschka 518959
Christoph Galuschka 518959
# Executing python
Christoph Galuschka 518959
python $FILE -o $EXE | grep -cq 'hello. centos!'
Christoph Galuschka 518959
Christoph Galuschka 518959
t_CheckExitStatus $?
Christoph Galuschka 518959
Christoph Galuschka 518959
# remove files
Christoph Galuschka 518959
/bin/rm $FILE