Skip to content

Let rstudio-tests.bat run more than one scope - #18384

Merged
gtritchie merged 3 commits into
mainfrom
developer/rstudio-tests-multiple-scopes
Jul 28, 2026
Merged

gtritchie merged 3 commits into
mainfrom
developer/rstudio-tests-multiple-scopes

Conversation

@gtritchie

Copy link
Copy Markdown
Member

--scope in the Windows test runner accepted exactly one scope, so running two of
the four suites meant two invocations. It now takes several.

cmd.exe treats a comma as an argument separator, so --scope core,rsession arrives
as two separate arguments. --scope therefore collects every argument up to the next
option, which makes three forms equivalent:

rstudio-tests.bat --scope core,rsession
rstudio-tests.bat --scope core rsession
rstudio-tests.bat --scope core --scope rsession

Scope names are validated, case-normalized, and de-duplicated into a delimited list
before any suite runs, so a typo anywhere in the list fails up front rather than after
the first suite finishes. Scopes run in the fixed core, rserver, rsession, r
order regardless of the order requested, which keeps the slow r scope last.

The help and /? arguments are not - prefixed, so scope collection stops at them
as well; rstudio-tests.bat --scope core help prints usage and exits 0.

The Unix rstudio-tests script still takes a single scope. Existing single-scope
callers, including --scope core in jenkins/Jenkinsfile.windows, are unaffected.

Testing

Argument handling was exercised against a copy of the script whose scope subroutines
were replaced with stubs that echo instead of running the suites: single scope, all
three multi-scope forms, mixed case, duplicates, --filter on either side of
--scope, --filter alone still implying r, each help form both alone and trailing
a --scope, and the error paths (unknown scope alone and inside a list, --scope
with no value, and whitespace-only).

rstudio-tests.bat --scope core,rserver was then run against a real build: the
core and shared_core suites ran, rserver reported that it is not built on this
platform, and the exit code still reflected the one failing test
(Win32ConPtyTest.CtrlCByteTerminatesBusyChild, a pre-existing failure under a nested
pseudo-console).

--scope accepted exactly one scope, so running two of the four suites meant
two invocations. It now takes several: cmd.exe splits arguments on commas, so
'--scope core,rsession' arrives as separate arguments and every argument up to
the next option is collected as a scope. The flag may also be repeated, and
names are validated and de-duplicated before any suite runs.

Scopes run in the fixed core, rserver, rsession, r order regardless of the
order requested.
@gtritchie gtritchie added this to the 2026.08 (Yellow Yarrow) milestone Jul 28, 2026
@posit-snyk-bot

posit-snyk-bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
1891 0 356 3
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ desktop-linux 469 0 88 1
✅ desktop-macos 473 0 85 1
✅ desktop-windows 474 0 89 1
✅ server-linux 455 0 94 0
✅ setup 20 0 0 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit ad7dc2d2adaf1d4dfe01365bb99b10a2a390a05c - Run #373

@gtritchie
gtritchie merged commit e630646 into main Jul 28, 2026
26 checks passed
@gtritchie
gtritchie deleted the developer/rstudio-tests-multiple-scopes branch July 28, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants