|
KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>#include <qa_utils/wx_utils/unit_test_utils.h>#include <common.h>#include <gestfich.h>#include <jobs/job_special_execute.h>#include <paths.h>#include <project.h>#include <settings/settings_manager.h>#include <wx/process.h>#include <wx/txtstrm.h>#include <wx/filename.h>#include <wx/dir.h>#include <wx/file.h>#include <wx/stdpaths.h>Go to the source code of this file.
Functions | |
| static int | executeViaShell (const wxString &aCmd, wxString &aOutput) |
| Drive the production ExecuteCommandThroughShell (the exact function jobsets use) and capture its stdout so the shell-wrapping behaviour is tested directly rather than through a copy. | |
| BOOST_AUTO_TEST_CASE (SimpleCommand) | |
| BOOST_AUTO_TEST_CASE (GlobExpansion) | |
| BOOST_AUTO_TEST_CASE (PipeSupport) | |
| BOOST_AUTO_TEST_CASE (ExitCodePropagation) | |
| BOOST_AUTO_TEST_CASE (CommandWithSingleQuotes) | |
| BOOST_AUTO_TEST_CASE (AbsolutePathWithSpaces) | |
| Regression for https://gitlab.com/kicad/code/kicad/-/issues/24226. | |
| BOOST_AUTO_TEST_CASE (ExecutableDirectoryOnPath) | |
| BOOST_AUTO_TEST_CASE (BundledPythonDirectory) | |
| BOOST_AUTO_TEST_CASE (ExecuteBuiltinVariables) | |
| BOOST_AUTO_TEST_CASE (BundledPythonLookup) | |
| BOOST_AUTO_TEST_CASE | ( | AbsolutePathWithSpaces | ) |
Regression for https://gitlab.com/kicad/code/kicad/-/issues/24226.
An absolute path containing spaces, quoted by the user, must reach the interpreter intact. The old array-form invocation on Windows let wxExecute backslash-escape the quotes and cmd.exe then mangled the path. Run an interpreter located at a spaced absolute path against a script that prints a sentinel and verify the sentinel comes back.
Definition at line 212 of file test_jobs_runner.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), executeViaShell(), and result.
| BOOST_AUTO_TEST_CASE | ( | BundledPythonDirectory | ) |
Definition at line 290 of file test_jobs_runner.cpp.
References BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), PATHS::GetToolDirectories(), and RmDirRecursive().
| BOOST_AUTO_TEST_CASE | ( | BundledPythonLookup | ) |
Definition at line 374 of file test_jobs_runner.cpp.
References BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FindBundledPython(), name, and RmDirRecursive().
| BOOST_AUTO_TEST_CASE | ( | CommandWithSingleQuotes | ) |
Definition at line 170 of file test_jobs_runner.cpp.
References BOOST_CHECK_EQUAL(), executeViaShell(), and result.
| BOOST_AUTO_TEST_CASE | ( | ExecutableDirectoryOnPath | ) |
Definition at line 268 of file test_jobs_runner.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), executeViaShell(), and result.
| BOOST_AUTO_TEST_CASE | ( | ExecuteBuiltinVariables | ) |
Definition at line 319 of file test_jobs_runner.cpp.
References BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), ExpandExecuteCommand(), KI_TEST::GetTestDataRootDir(), SETTINGS_MANAGER::LoadProject(), name, SETTINGS_MANAGER::Prj(), RmDirRecursive(), and SETTINGS_MANAGER::UnloadProject().
| BOOST_AUTO_TEST_CASE | ( | ExitCodePropagation | ) |
Definition at line 152 of file test_jobs_runner.cpp.
References BOOST_CHECK_EQUAL(), executeViaShell(), and result.
| BOOST_AUTO_TEST_CASE | ( | GlobExpansion | ) |
Definition at line 94 of file test_jobs_runner.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), executeViaShell(), and result.
| BOOST_AUTO_TEST_CASE | ( | PipeSupport | ) |
Definition at line 136 of file test_jobs_runner.cpp.
References BOOST_CHECK(), BOOST_CHECK_EQUAL(), executeViaShell(), and result.
| BOOST_AUTO_TEST_CASE | ( | SimpleCommand | ) |
Definition at line 81 of file test_jobs_runner.cpp.
References BOOST_CHECK(), BOOST_CHECK_EQUAL(), executeViaShell(), and result.
|
static |
Drive the production ExecuteCommandThroughShell (the exact function jobsets use) and capture its stdout so the shell-wrapping behaviour is tested directly rather than through a copy.
Definition at line 50 of file test_jobs_runner.cpp.
References ExecuteCommandThroughShell(), executeViaShell(), process, and result.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and executeViaShell().