Exemplo n.º 1
0
def test_results_wptfyi(env, pr_19900_github):
    results_data = results.Results()
    results_data.add_jobs_from_log_files(*pr_19900_github)
    summary = results_data.summary()
    assert summary.parent_tests == 1
    assert summary.subtests == 1
    assert summary.job_results == {
        "OK": {"chrome": {"GitHub": 1},
               "safari": {"GitHub": 1}},
        "FAIL": {"chrome": {"GitHub": 1},
                 "safari": {"GitHub": 1}},
        "ERROR": {"firefox": {"GitHub": 1}},
        "NOTRUN": {"firefox": {"GitHub": 1}},
    }
    assert list(results_data.iter_browser_only()) == [(
        "/html/browsers/sandboxing/sandbox-new-execution-context.html",
        None,
        results_data.test_results[
            "/html/browsers/sandboxing/sandbox-new-execution-context.html"])]
    assert list(results_data.iter_crashes()) == []
    assert list(results_data.iter_new_non_passing()) == [
        ("/html/browsers/sandboxing/sandbox-new-execution-context.html",
         None,
         results_data.test_results[
             "/html/browsers/sandboxing/sandbox-new-execution-context.html"]),
        ("/html/browsers/sandboxing/sandbox-new-execution-context.html",
         "iframe with sandbox should load with new execution context",
         results_data.test_results[
             "/html/browsers/sandboxing/sandbox-new-execution-context.html"]
         .subtests["iframe with sandbox should load with new execution context"])]

    assert list(results_data.iter_regressions()) == []
    assert list(results_data.iter_disabled()) == []
Exemplo n.º 2
0
def test_msg_gecko(env, pr_19900_gecko_ci):
    results_data = results.Results()
    results_data.add_jobs_from_log_files(*pr_19900_gecko_ci)
    results_data.treeherder_url = ("https://treeherder.mozilla.org/#/jobs?"
                                   "repo=try&"
                                   "revision=b0337497587b2bac7d2baeecea0d873df8bcb4f4")
    message = msg.for_results(results_data)
    assert message[0] == """# CI Results
Exemplo n.º 3
0
def test_results_gecko(env, pr_19900_gecko_ci):
    results_data = results.Results()
    results_data.add_jobs_from_log_files(*pr_19900_gecko_ci)
    summary = results_data.summary()
    assert summary.subtests == 1
    assert summary.parent_tests == 1
    assert summary.job_results == {
        "NOTRUN": {
            "firefox": {
                "Gecko-windows10-64-qr-debug": 1,
                "Gecko-linux64-asan-opt": 1,
                "Gecko-windows7-32-debug": 1,
                "Gecko-windows10-64-qr-opt": 1,
                "Gecko-android-em-7.0-x86_64-debug-geckoview": 1,
                "Gecko-windows7-32-opt": 1,
                "Gecko-linux64-qr-debug": 1,
                "Gecko-linux64-opt": 1,
                "Gecko-android-em-7.0-x86_64-opt-geckoview": 1,
                "Gecko-windows10-64-debug": 1,
                "Gecko-linux64-qr-opt": 1,
                "Gecko-linux64-debug": 1,
                "Gecko-windows10-64-opt": 1
            }
        },
        "ERROR": {
            "firefox": {
                "Gecko-windows10-64-qr-debug": 1,
                "Gecko-linux64-asan-opt": 1,
                "Gecko-windows7-32-debug": 1,
                "Gecko-windows10-64-qr-opt": 1,
                "Gecko-android-em-7.0-x86_64-debug-geckoview": 1,
                "Gecko-windows7-32-opt": 1,
                "Gecko-linux64-qr-debug": 1,
                "Gecko-linux64-opt": 1,
                "Gecko-android-em-7.0-x86_64-opt-geckoview": 1,
                "Gecko-windows10-64-debug": 1,
                "Gecko-linux64-qr-opt": 1,
                "Gecko-linux64-debug": 1,
                "Gecko-windows10-64-opt": 1
            }
        }
    }

    assert list(results_data.iter_browser_only()) == []
    assert list(results_data.iter_crashes()) == []
    assert list(results_data.iter_new_non_passing()) == [
        ("/html/browsers/sandboxing/sandbox-new-execution-context.html",
         None,
         results_data.test_results[
             "/html/browsers/sandboxing/sandbox-new-execution-context.html"]),
        ("/html/browsers/sandboxing/sandbox-new-execution-context.html",
         "iframe with sandbox should load with new execution context",
         results_data.test_results[
             "/html/browsers/sandboxing/sandbox-new-execution-context.html"]
         .subtests["iframe with sandbox should load with new execution context"])]

    assert list(results_data.iter_regressions()) == []
    assert list(results_data.iter_disabled()) == []
Exemplo n.º 4
0
def test_msg_both(env, pr_19900_gecko_ci, pr_19900_github):
    results_data = results.Results()
    results_data.add_jobs_from_log_files(*pr_19900_gecko_ci)
    results_data.treeherder_url = ("https://treeherder.mozilla.org/#/jobs?"
                                   "repo=try&"
                                   "revision=b0337497587b2bac7d2baeecea0d873df8bcb4f4")
    results_data.add_jobs_from_log_files(*pr_19900_github)
    results_data.wpt_sha = "6146f4a506c1b7efaac68c9e8d552597212eabca"
    message = msg.for_results(results_data)
    assert message[0] == """# CI Results
Exemplo n.º 5
0
def fx_crash():
    result = results.TestResult()
    result.set_status("firefox", "GitHub", False, "PASS", ["PASS"])
    result.set_status("firefox", "GitHub", True, "CRASH", ["PASS"])

    results_obj = results.Results()
    results_obj.test_results = {"/test/test.html": result}
    results_obj.wpt_sha = "abcdef"
    results_obj.treeherder_url = "https://treeherder.mozilla.org"

    return results_obj
Exemplo n.º 6
0
def test_msg_wptfyi(env, pr_19900_github):
    results_data = results.Results()
    results_data.add_jobs_from_log_files(*pr_19900_github)
    results_data.wpt_sha = "6146f4a506c1b7efaac68c9e8d552597212eabca"
    message = msg.for_results(results_data)
    assert message[0] == """# CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

## Status Summary

### Firefox
ERROR : 1
NOTRUN: 1

### Chrome
OK    : 1
FAIL  : 1

### Safari
OK    : 1
FAIL  : 1

## Links
[GitHub PR Head](https://wpt.fyi/results/?sha=6146f4a506c1b7efaac68c9e8d552597212eabca&label=pr_head)
[GitHub PR Base](https://wpt.fyi/results/?sha=6146f4a506c1b7efaac68c9e8d552597212eabca&label=pr_base)

## Details

### Firefox-only Failures
/html/browsers/sandboxing/sandbox-new-execution-context.html: ERROR

### New Tests That Don't Pass
/html/browsers/sandboxing/sandbox-new-execution-context.html: ERROR (Chrome: OK, Safari: OK)
  iframe with sandbox should load with new execution context: NOTRUN (Chrome: FAIL, Safari: FAIL)
"""  # noqa: E501
    assert message[1] is None