diff --git a/tests/New_ATS/RunPythonClient.bat b/tests/New_ATS/RunPythonClient.bat index 02f53914..5db0a153 100644 --- a/tests/New_ATS/RunPythonClient.bat +++ b/tests/New_ATS/RunPythonClient.bat @@ -1,11 +1,17 @@ @echo off -set python_client_path=%1 -set test_name=%2 -set rpc_name=%3 +setlocal + +set "python_client_path=%~1" +set "test_name=%~2" +set "rpc_name=%~3" + pushd %~dp0 -set script_dir=%CD% +set "script_dir=%CD%" popd -if not exist "./logs" mkdir logs -if not exist "./logs/%test_name%" mkdir logs/%test_name% -call %script_dir%\venv\Scripts\python.exe -m pytest %python_client_path% --junitxml=%script_dir%/logs/%test_name%/%test_name%_%rpc_name%_test_results.xml -vv \ No newline at end of file +if not exist "%script_dir%\logs" mkdir "%script_dir%\logs" +if not exist "%script_dir%\logs\%test_name%" mkdir "%script_dir%\logs\%test_name%" + +call "%script_dir%\venv\Scripts\python.exe" -m pytest "%python_client_path%" --junitxml="%script_dir%\logs\%test_name%\%test_name%_%rpc_name%_test_results.xml" -vv + +endlocal \ No newline at end of file diff --git a/tests/New_ATS/pylib/run_tests.py b/tests/New_ATS/pylib/run_tests.py index 95c56143..461b50d5 100644 --- a/tests/New_ATS/pylib/run_tests.py +++ b/tests/New_ATS/pylib/run_tests.py @@ -20,8 +20,8 @@ def count_failed_testcases(test_summary): def run_command(command): output = subprocess.run(command, capture_output=True, text=True) if output.stderr: - # raise Exception(output.stderr) - print(output.stderr) + raise Exception(output.stderr) + # print(output.stderr) return output.stdout @@ -132,7 +132,6 @@ def run_test(test_config): rpc_name ]) print (f"Running python client for {rpc_name}") - print(run_client_command) output = run_command(run_client_command) print(output+'\n') FAILED += count_failed_testcases(output)