Commit 259880fa authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Using a different validation script

parent 98f31342
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ Validate MEC Robot Test Suite:
  stage: validation
  script:
    - echo 'Validate MEC Robot Test Suite'
    - docker run -v "$(pwd):/home/etsi/dev/robot" -u $(id -u):$(id -g) etsiforge/mec-ts:latest "/bin/bash" -c  "cd /home/etsi/dev/robot && sh scripts/run-all.bash && ls -ltr logs/"
    - docker run -v "$(pwd):/home/etsi/dev/robot" -u $(id -u):$(id -g) etsiforge/mec-ts:latest "/bin/bash" -c  "/home/etsi/dev/scripts/validate.sh $CI_COMMIT_BRANCH"
    #- docker run -v "$(pwd):/home/etsi/dev/robot" -u $(id -u):$(id -g) etsiforge/mec-ts:latest "/bin/bash" -c  "cd /home/etsi/dev/robot && sh scripts/run-all.bash && ls -ltr logs/"
      
# Generate API Robot Test Suite docx:
  # stage: generation
+20 −0
Original line number Diff line number Diff line
#!/bin/bash
#
# Validate syntax and keywords existance in each Robot file

cd /home/etsi/dev/robot/ 

res=0
for i in */*/*.robot ; do
    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
done

exit $res