#!/bin/bash if [ -d "report" ];then rm -rf report else : fi if [ -d "html" ];then : else mkdir html fi if [ -d "case" ];then cd case else mkdir case cd case fi pytest --alluredir=../report if [ -d "../html" ];then allure generate ../report --clean -o ../html else allure generate ../report -o ../html fi if[ -f "../html/data/suites.csv" ];then check_results=`cat ../html/data/suites.csv|grep "failed"` if [[ $check_results ]]; then exit 1 else exit 0 fi else exit 1 fi