File tree Expand file tree Collapse file tree 4 files changed +53
-2
lines changed
Expand file tree Collapse file tree 4 files changed +53
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ build_targets_integration: &build_targets_integration
2222test_targets : &test_targets
2323 - " //test/..."
2424 - " //java/test/..."
25- # linux-only tests
26- - " -//test:check_remote_jdk_configs_test"
2725 # TODO: re-enable docs after moving them out of https://bazel.build/reference/be/java
2826 - " -//test:docs_up_to_date_test"
2927
@@ -108,5 +106,10 @@ tasks:
108106 name : " Extra tests w/ Bazel {bazel}"
109107 bazel : ${{ bazel }}
110108 platform : " ubuntu2004"
109+ shell_commands :
110+ - " git config user.name 'fake-user-for-testing'"
111+ - " git tag -a 'fake-tag-for-testing' -m 'ignore'"
112+ - " git commit --allow-empty -m 'Fake commit message for testing'"
111113 test_targets :
112114 - " //test:check_remote_jdk_configs_test"
115+ - " //test:check_release_notes_test"
Original file line number Diff line number Diff line change 4848 """ .format (ARCHIVE = archive , VERSION = version ),
4949 srcs = [archive ],
5050 tags = ["local" , "manual" ],
51+ visibility = ["//test:__pkg__" ],
5152 )
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ sh_test(
3131 for configs in REMOTE_JDK_CONFIGS .values ()
3232 for config in configs
3333 ],
34+ tags = ["manual" ], # explicitly tested only on Linux
3435)
3536
3637sh_test (
@@ -47,6 +48,17 @@ sh_test(
4748 ],
4849)
4950
51+ sh_test (
52+ name = "check_release_notes_test" ,
53+ srcs = ["check_release_notes_test.sh" ],
54+ args = [
55+ "$(location //distro:relnotes.txt)" ,
56+ module_version (),
57+ ],
58+ data = ["//distro:relnotes.txt" ],
59+ tags = ["manual" ], # explicitly tested only on Linux
60+ )
61+
5062diff_test (
5163 name = "docs_up_to_date_test" ,
5264 failure_message = """
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Copyright 2025 The Bazel Authors. All rights reserved.
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ RELNOTES_FILE=$1
17+ VERSION=$2
18+
19+ function fail() {
20+ echo " ERROR: ${1} "
21+ echo " Release notes content:"
22+ echo " --------------------------------------"
23+ cat ${RELNOTES_FILE}
24+ echo " --------------------------------------"
25+ exit 1
26+ }
27+
28+ echo " Checking generated release notes: ${RELNOTES_FILE} "
29+
30+ grep -q ' **Changes since fake-tag-for-tests**' ${RELNOTES_FILE} || fail " No changelog header"
31+ grep -q ' Fake commit message for testing' ${RELNOTES_FILE} || fail " No changelog commit"
32+ grep -q ' **MODULE.bazel setup**' ${RELNOTES_FILE} || fail " No bzlmod setup header"
33+ grep -q " bazel_dep(name = \" rules_java\" , version = \" ${VERSION} \" )" ${RELNOTES_FILE} || fail " No bzlmod dep stanza"
34+ grep -q ' **WORKSPACE setup**' ${RELNOTES_FILE} || fail " No WORKSPACE setup header"
35+ grep -q ' **Using the rules**' ${RELNOTES_FILE} || fail " No using the rules header"
You can’t perform that action at this time.
0 commit comments