:: Wrapper for the RobotFramework test runner
@echo off

set PATH=%PATH%;C:\Python27;C:\Python27\Scripts

echo PATH=%PATH%

:: Keep environment changes local
setlocal ENABLEEXTENSIONS

call "%~dp0\testenv.bat" %*
call pybot %args%

:: Some Jenkins plugins (like the Jenkins Performance Plugin) do not take
:: testcase fullnames into account. Testnames with identical names but from
:: different testsuites are considered a single testcase. This results in
:: confusing reports and graphs. We patch the xunit file generated by
:: RobotFramework and replace testcase names by their full names.

if exist xunit.xml (
    echo Generating XUnit report with full testcase names
    "%VORPALINE_SOURCE_DIR%\tools\jenkins\xunit_full_names.pl" xunit.xml > xunit_full_names.xml
)

