File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,8 +77,19 @@ def test_features_round_trip(self):
7777 self .assertGreaterEqual (f .major_version , 7 )
7878 revision = f .revision .decode ("ascii" )
7979 self .assertRegex (revision , r"^[0-9a-f]{40}$" )
80- expected_revision = os .environ .get ("GITHUB_SHA" )
80+ # GITHUB_SHA is the synthetic pull-request merge commit for PR jobs,
81+ # even when the workflow deliberately checks out the PR's head commit.
82+ # The caller must therefore pass the revision of the source tree that
83+ # actually produced the dylib instead of relying on GitHub's ambient
84+ # merge-ref value.
85+ expected_revision = os .environ .get ("KK_EXPECTED_FIRMWARE_REVISION" )
86+ if os .environ .get ("GITHUB_ACTIONS" ) == "true" :
87+ self .assertIsNotNone (
88+ expected_revision ,
89+ "GitHub Actions must bind the dylib test to its checked-out source revision" ,
90+ )
8191 if expected_revision :
92+ self .assertRegex (expected_revision , r"^[0-9a-f]{40}$" )
8293 self .assertEqual (revision , expected_revision )
8394
8495 @unittest .skip (
You can’t perform that action at this time.
0 commit comments