validate.sh 740 Bytes
Newer Older
#!/bin/bash
#
# Validate syntax and keywords existance in each Robot file

Michele Carignani's avatar
Michele Carignani committed
cd /home/etsi/dev/robot/ 

res=0
for i in */*/*.robot ; do
Michele Carignani's avatar
Michele Carignani committed
    if [[ "$i" != *"Keywords.robot"* && "$i" != *"Keyword.robot"* ]] ; then
	echo "++++ Dryrun file $i"
	msg=$(robot --dryrun --output NONE --report NONE --log NONE $i 2>&1)
	if [ $? != 0 ] ; then
	    echo "++++ Issues found in file $i"
	    echo "$msg"
            res=1
        fi
    fi
mkdir -p /home/etsi/dev/build
cd /home/etsi/dev/build
rm -r -v *

if [[ "$1" =~ .*-dev$ || "$1" =~ \d+(\.?\d)+ || "$1" == "master" ]]; then
Miguel Angel Reina Ortega's avatar
Miguel Angel Reina Ortega committed
	cd /home/etsi/dev/robot2doc/robot2doc
Miguel Angel Reina Ortega's avatar
Miguel Angel Reina Ortega committed
	python3 create_sols.py ../../robot 'local' ../../build
	res2=$?
else res2=0
fi