Skip to content

Commit fecb82e

Browse files
ci: reflect scripts/run-test-suite fix harness dependency in suitespec test [backport 1.18] (#7036)
Backport 0dede17 from #7000 to 1.18. This fixes failing `pre_check` failing wherever #6941 was merged. `tests/.suitespec.json` being modified should trigger the doctests in `tests/suitespec.py`, otherwise a change there may merge, and then cause `pre_check` to fail on `2.x` where the `scripts/*py` tests are run. Also, the non `.py` scripts in `scripts/` should still cause tests to run. As part of this backport, some now-defunct `riot` calls are converted to use `-P` to match up with #7023 . ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that.
1 parent 8fc5d38 commit fecb82e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

scripts/gen_circleci_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ def check(name: str, command: str, paths: t.Set[str]) -> None:
7171
)
7272
check(
7373
name="Slots check",
74-
command="riot -v run slotscheck",
74+
command="riot -P -v run slotscheck",
7575
paths={"ddtrace/*.py", "hatch.toml"},
7676
)
7777
check(
7878
name="Run scripts/*.py tests",
79-
command="riot -v run -s scripts",
80-
paths={"scripts/*.py"},
79+
command="riot -P -v run -s scripts",
80+
paths={"scripts/*.py", "scripts/mkwheelhouse", "scripts/run-test-suite", "tests/.suitespec.json"},
8181
)
8282
check(
8383
name="Run conftest tests",
84-
command="riot -v run meta-testing",
84+
command="riot -P -v run meta-testing",
8585
paths={"tests/*conftest.py", "tests/meta/*"},
8686
)
8787
check(

tests/suitespec.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def get_patterns(suite: str) -> t.Set[str]:
2020
'ddtrace/settings/dynamic_instrumentation.py', 'ddtrace/settings/exception_debugging.py',
2121
'ddtrace/settings/http.py', 'ddtrace/settings/integration.py', 'ddtrace/span.py', 'ddtrace/tracer.py',
2222
'ddtrace/tracing/*', 'ddtrace/version.py', 'hatch.toml', 'pyproject.toml', 'riotfile.py', 'scripts/ddtest',
23-
'setup.cfg', 'setup.py', 'tests/.suitespec.json', 'tests/__init__.py', 'tests/conftest.py', 'tests/debugging/*']
23+
'scripts/run-test-suite', 'setup.cfg', 'setup.py', 'tests/.suitespec.json', 'tests/__init__.py',
24+
'tests/conftest.py', 'tests/debugging/*']
2425
>>> get_patterns("foobar")
2526
set()
2627
>>> sorted(get_patterns("urllib3")) # doctest: +NORMALIZE_WHITESPACE
@@ -30,8 +31,8 @@ def get_patterns(suite: str) -> t.Set[str]:
3031
'ddtrace/py.typed', 'ddtrace/sampler.py', 'ddtrace/settings/__init__.py', 'ddtrace/settings/config.py',
3132
'ddtrace/settings/http.py', 'ddtrace/settings/integration.py', 'ddtrace/span.py', 'ddtrace/tracer.py',
3233
'ddtrace/tracing/*', 'ddtrace/version.py', 'hatch.toml', 'pyproject.toml', 'riotfile.py', 'scripts/ddtest',
33-
'setup.cfg', 'setup.py', 'tests/.suitespec.json', 'tests/__init__.py', 'tests/conftest.py',
34-
'tests/contrib/urllib3/*', 'tests/snapshots/tests.contrib.urllib3.*']
34+
'scripts/run-test-suite', 'setup.cfg', 'setup.py', 'tests/.suitespec.json', 'tests/__init__.py',
35+
'tests/conftest.py', 'tests/contrib/urllib3/*', 'tests/snapshots/tests.contrib.urllib3.*']
3536
"""
3637
compos = SUITESPEC["components"]
3738
if suite not in SUITESPEC["suites"]:

0 commit comments

Comments
 (0)