diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-03-09 05:32:49 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-03-09 05:32:49 +0100 |
commit | 2f4d2c4141e741aab767af2aa3e9c6fb3316e384 (patch) | |
tree | 2283c788763da444538701fabb284179a30df94f /backend/ninja | |
parent | 7677125c3a99c0d794f7bdf9186a03782b065d11 (diff) |
Add --args to sibs test command
Diffstat (limited to 'backend/ninja')
-rw-r--r-- | backend/ninja/Ninja.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index eecbaee..6c69d13 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -1843,7 +1843,14 @@ namespace backend if(!zigTest && !config.testsBuildOnly) { - Result<ExecResult> runTestResult = exec({ Path(buildPath).join(toFileString(sibsTestConfig.getPackageName())).data }, true); + FileString executableName = toFileString(sibsTestConfig.getPackageName()); + if(isSamePlatformFamily(sibsTestConfig.platform, PLATFORM_WIN)) + executableName += TINYDIR_STRING(".exe"); + + std::vector<FileString> args = { Path(buildPath).join(executableName).data }; + args.insert(args.end(), config.testRunArgs.begin(), config.testRunArgs.end()); + + Result<ExecResult> runTestResult = exec(args, true); if(!runTestResult) return Result<bool>::Err(runTestResult); |