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.
27 lines
454 B
27 lines
454 B
10 months ago
|
#!/bin/sh
|
||
|
# Author: Christoph Galuschka <christoph.galuschka@chello.at>
|
||
|
# Athmane Madjodj <athmanem@gmail.com>
|
||
|
|
||
|
t_Log "Running $0 - python can print Hello World"
|
||
|
|
||
|
if [ "$centos_ver" -ge 8 ] ; then
|
||
|
PYTHON=python3
|
||
|
else
|
||
|
PYTHON=python
|
||
|
fi
|
||
|
|
||
|
# creating source file
|
||
|
FILE='/var/tmp/python-test.py'
|
||
|
|
||
|
cat > $FILE <<EOF
|
||
|
print ("hello centos")
|
||
|
EOF
|
||
|
|
||
|
# Executing python
|
||
|
$PYTHON $FILE | grep -q "hello centos"
|
||
|
|
||
|
t_CheckExitStatus $?
|
||
|
|
||
|
# remove files
|
||
|
/bin/rm $FILE
|