mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-06 20:43:46 +08:00
Balance measured Ford lifecycle work
This commit is contained in:
@@ -768,6 +768,18 @@
|
||||
"shard": 8,
|
||||
"results_sha256": "a14538044b22704179bab89d0f9ded3a4f90480c14d4ea9c76047f933d2e48c5"
|
||||
}
|
||||
},
|
||||
"openpilot/starpilot/tests/test_ford_bluepilot_library_lifecycle.py": {
|
||||
"cases": 169,
|
||||
"seconds": 379.154066635998,
|
||||
"source_sha256": "f4d7638b7e900833b02b2823fdc5c7a28ac00c11b5776e372b39f56afa4d0a8d",
|
||||
"reference": {
|
||||
"revision": "195b7000aab3a8ae7045fcb834c288b487d3ffd1",
|
||||
"run_id": 41276755327,
|
||||
"artifact_id": 13071624813,
|
||||
"shard": 6,
|
||||
"results_sha256": "bd83c3f6bb9d0b837eb7da6dcf61e29da226c3a3a6e546489b0b6310a60b0280"
|
||||
}
|
||||
}
|
||||
},
|
||||
"reference": {
|
||||
|
||||
@@ -73,6 +73,24 @@ class LifecycleShardTests(unittest.TestCase):
|
||||
self.assertCountEqual(selected, identities)
|
||||
self.assertEqual(shards, helper.partition(list(reversed(targets)), list(reversed(identities)), 2))
|
||||
|
||||
def test_measured_bluepilot_lifecycle_is_not_packed_as_unknown_work(self):
|
||||
module = 'openpilot/starpilot/tests/test_ford_bluepilot_library_lifecycle.py'
|
||||
policy = helper.workload_policy()
|
||||
measured = policy['modules'][module]
|
||||
self.assertNotIn(module, policy['function_groups'])
|
||||
self.assertEqual(measured['cases'], 169)
|
||||
self.assertGreater(measured['seconds'], 300 * policy['unknown_seconds_per_case'])
|
||||
self.assertEqual(len(measured['source_sha256']), 64)
|
||||
self.assertEqual(measured['reference']['artifact_id'], 13071624813)
|
||||
prefix = module.removesuffix('.py').replace('/', '.') + '.'
|
||||
identities = [prefix + f'test_case[{index}]' for index in range(169)]
|
||||
identities += [f'other.test_case[{index}]' for index in range(300)]
|
||||
shards = helper.partition([module, 'other.py'], identities, 2)
|
||||
self.assertEqual(shards, [[module], ['other.py']])
|
||||
selected = [identity for shard in shards for identity in identities
|
||||
if any(helper.matches(identity, target) for target in shard)]
|
||||
self.assertCountEqual(selected, identities)
|
||||
|
||||
def test_only_large_reviewed_heavy_functions_split_into_exact_parameter_leaves(self):
|
||||
heavy = 'openpilot/starpilot/car/toyota/tests/test_legacy_advert_callers.py'
|
||||
prefix = heavy.removesuffix('.py').replace('/', '.') + '.'
|
||||
|
||||
Reference in New Issue
Block a user