bstinson / centos / t_functional

Forked from centos/t_functional 4 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 57ba95
print "hello centos"
Christoph Galuschka 518959
EOF
Christoph Galuschka 518959
Christoph Galuschka 518959
# Executing python
Christoph Galuschka dbdd5f
python $FILE | grep -q "hello centos"
Christoph Galuschka 518959
Christoph Galuschka 518959
t_CheckExitStatus $?
Christoph Galuschka 518959
Christoph Galuschka 518959
# remove files
Christoph Galuschka 518959
/bin/rm $FILE