diff --git a/run_tests.sh b/run_tests.sh index 877351b405f..217d7657bbd 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -46,6 +46,7 @@ ensure_grunt() { test_script="./scripts/functional_tests.py" report_file="run_functional_tests.html" +xunit_report_file="" with_framework_test_tools_arg="" driver="python" @@ -146,6 +147,15 @@ do exit 1 fi ;; + --xunit_report_file) + if [ $# -gt 1 ]; then + xunit_report_file=$2 + shift 2 + else + echo "--xunit_report_file requires an argument" 1>&2 + exit 1 + fi + ;; -c|--coverage) # Must have coverage installed (try `which coverage`) - only valid with --unit # for now. Would be great to get this to work with functional tests though. @@ -234,7 +244,12 @@ else fi if [ "$driver" = "python" ]; then - python $test_script $coverage_arg -v --with-nosehtml --html-report-file $report_file $with_framework_test_tools_arg $extra_args + if [ -n "$xunit_report_file" ]; then + xunit_args="--with-xunit --xunit-file $xunit_report_file" + else + xunit_args="" + fi + python $test_script $coverage_arg -v --with-nosehtml --html-report-file $report_file $xunit_args $with_framework_test_tools_arg $extra_args else ensure_grunt if [ -n "$watch" ]; then