Skip to content

Commit

Permalink
Bug 1700767 - Remove live site filter for Raptor tests; r=perftest-re…
Browse files Browse the repository at this point in the history
…viewers,Bebe

Differential Revision: https://phabricator.services.mozilla.com/D109665
  • Loading branch information
davehunt committed Mar 29, 2021
1 parent 151f69c commit 2c8aa7e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 53 deletions.
53 changes: 1 addition & 52 deletions testing/raptor/raptor/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,70 +38,19 @@
"playback_recordings",
]

whitelist_live_site_tests = [
"booking-sf",
"cnn-ampstories",
"discord",
"expedia",
"fashionbeans",
"google-accounts",
"imdb-firefox",
"medium-article",
"nytimes",
"people-article",
"raptor-youtube-playback",
"youtube-playback",
"reddit-thread",
"rumble-fox",
"stackoverflow-question",
"urbandictionary-define",
"wikia-marvel",
]


def filter_app(tests, values):
for test in tests:
if values["app"] in test["apps"]:
yield test


def filter_live_sites(tests, values):
# if a test uses live sites only allow it to run if running locally or on try
# this prevents inadvertently submitting live site data to perfherder
for test in tests:
if test.get("use_live_sites", "false") == "true":
# can run with live sites when running locally
if values["run_local"] is True:
yield test
# can run with live sites if running on try
elif "hg.mozilla.org/try" in os.environ.get("GECKO_HEAD_REPOSITORY", "n/a"):
yield test

# can run with live sites when white-listed
# pylint --py3k: W1639
elif list(
filter(
lambda name: test["name"].startswith(name),
whitelist_live_site_tests,
)
):
yield test

else:
LOG.warning(
"%s is not allowed to run with use_live_sites" % test["name"]
)
else:
# not using live-sites so go ahead
yield test


def get_browser_test_list(browser_app, run_local):
LOG.info(raptor_ini)
test_manifest = TestManifest([raptor_ini], strict=False)
info = {"app": browser_app, "run_local": run_local}
return test_manifest.active_tests(
exists=False, disabled=False, filters=[filter_app, filter_live_sites], **info
exists=False, disabled=False, filters=[filter_app], **info
)


Expand Down
1 change: 0 additions & 1 deletion tools/lint/rejected-words.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ avoid-blacklist-and-whitelist:
- testing/profiles/unittest-required/user.js
- testing/raptor/browsertime/browsertime_scenario.js
- testing/raptor/raptor/control_server.py
- testing/raptor/raptor/manifest.py
- testing/specialpowers/content/SpecialPowersChild.jsm
- testing/talos/talos/tests/devtools/addon/content/pages/custom/debugger/static/js/main.js
- testing/web-platform/tests/common/security-features/README.md
Expand Down

0 comments on commit 2c8aa7e

Please sign in to comment.