Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,14 @@ jobs:
# Since webcpp::crypto and webcpp::hash joined, an MSVC lane builds OpenSSL in more
# configurations (about 27 minutes each on a runner): on webcpporg/webcpp#24 (run
# 43982348264) MSVC 14.3 took 58 minutes and 90 cancelled MSVC 14.5 at 12,600 of its
# 12,948 targets; the runners' speed varies.
timeout-minutes: 150
# 12,948 targets; the runners' speed varies. Since webcpp::codecs and the formats joined,
# an MSVC lane updates 25,832 targets (16,034 on main's run 44781154690, where MSVC 14.5
# took 64 minutes with its third-party cache). On main's run 46916884991 a new runner image
# and new third-party inputs left both MSVC lanes without that cache, so each built OpenSSL
# in five configurations and libdatachannel in two (150 minutes of its four b2 jobs, about
# 37 of the lane's): MSVC 14.3 took 118 minutes, and 150 cancelled MSVC 14.5 at 25,000 of
# its 25,832 targets, about 156 minutes at its pace. 210 leaves such a run a third more.
timeout-minutes: 210
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.plan.outputs.matrix) }}
Expand Down Expand Up @@ -268,9 +274,13 @@ jobs:
job: ${{ matrix.id }}

# The lane registers its toolset in .local/user-config.jam, prints its b2 command and runs
# it; Windows's Python is python.
# it; Windows's Python is python. Its own limit, below the job's, ends a lane that overruns
# as a failed step, not a cancelled job, so that the third-party builds it finished are
# still saved: a lane the job's limit cancelled saved none, and the next run, without
# them, built them again and overran again.
- name: Lane
id: lane
timeout-minutes: 195
env:
LANE: ${{ toJSON(matrix) }}
PYTHON: ${{ runner.os == 'Windows' && 'python' || 'python3' }}
Expand Down
2 changes: 1 addition & 1 deletion libs/codecs
2 changes: 1 addition & 1 deletion libs/crypto
2 changes: 1 addition & 1 deletion libs/hash
2 changes: 1 addition & 1 deletion libs/secure
7 changes: 6 additions & 1 deletion tools/report/lanes.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ def row(location: str, example: bool, row_name: str, row_type: str) -> tuple[Row
slashed(dependency.text or '') for dependency in element.findall(
'dependencies/dependency'))

# A build of a test is its <target>.test, in <location>/<target>.test/<toolset>/...; of an
# A build of a test is its <target>.test, in <location>/<target>.test/<toolset>/..., or, with
# b2's <location-prefix>, in <location>/<prefix>/<target>.test/<toolset>/... (two programs of
# one source, as the constant-time lanes' planted leaks, each a directory of its own); of an
# example, its <name>.output, in <location>/<toolset>/...
toolsets: set[str] = set()
owners: dict[str, list[Build]] = {}
Expand All @@ -361,6 +363,9 @@ def row(location: str, example: bool, row_name: str, row_type: str) -> tuple[Row
if target in tests:
owner, relative = tests[target], under_root(directory, location)
toolset = segment_after(built_in, f'{relative}/{file}')
prefixed = segment_after(built_in, relative)
if toolset is None and prefixed is not None:
toolset = segment_after(built_in, f'{relative}/{prefixed}/{file}')
elif file.endswith('.output'):
owner, relative = row(location, True, file[:-len('.output')], 'example')
toolset = segment_after(built_in, relative)
Expand Down
27 changes: 27 additions & 0 deletions tools/report/report_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,32 @@ def test_an_action_in_a_tests_own_directory_is_the_tests(root: Path) -> None:
check_pages(out)


def test_a_tests_directory_under_a_location_prefix_names_its_toolset(root: Path) -> None:
# b2's <location-prefix> puts a test's directory one level deeper, <location>/<prefix>/
# <name>.test/<toolset>/..., as the constant-time lanes give each planted leak, a program of
# a source another program has too. The report reads its toolset there, and its verdict.
text = sample('native-pass').read_text(encoding='utf-8')
moved = text.replace('bin/libs/demo/test/pass.test/', 'bin/libs/demo/test/pass/pass.test/')
assert moved != text, 'the test pass moved'
(root / 'prefixed.xml').write_text(moved, encoding='utf-8')
out = root / 'report'
result = report(out, ('native', root / 'prefixed.xml'))
assert result.returncode == 0, outcome(result)
assert matrix(out / 'demo.html').verdict('pass', 'native') == 'pass'
check_pages(out)
text = sample('native-failures').read_text(encoding='utf-8')
moved = text.replace('bin/libs/planted/test/fails_to_link.test/',
'bin/libs/planted/test/linked/fails_to_link.test/')
assert moved != text, 'the test fails_to_link moved'
(root / 'prefixed-failures.xml').write_text(moved, encoding='utf-8')
out = root / 'failures'
result = report(out, ('native', root / 'prefixed-failures.xml'))
assert result.returncode == 1, outcome(result)
assert 'native: planted/fails_to_link: link' in result.stderr, outcome(result)
assert matrix(out / 'planted.html').verdict('fails_to_link', 'native') == 'link'
check_pages(out)


def test_output_cdata_cannot_hold_is_shown(root: Path) -> None:
# The test prints ]]>, which ends b2's CDATA early, markup, and a byte that is not UTF-8.
data = sample('native-odd-output').read_bytes()
Expand Down Expand Up @@ -1037,6 +1063,7 @@ def test_samples_read_as_b2_writes_them_today(root: Path) -> None:
test_an_own_lane_that_builds_a_size_table_built_something,
test_a_failure_outside_every_test_fails_the_lane,
test_an_action_in_a_tests_own_directory_is_the_tests,
test_a_tests_directory_under_a_location_prefix_names_its_toolset,
test_output_cdata_cannot_hold_is_shown,
test_served_test_passes_and_fails_as_a_run,
test_emscripten_lane_and_its_link_and_driven_tests,
Expand Down
Loading