From 3f7270b47ec2f4b0bf91c050129502b59dd35e69 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 24 Sep 2025 21:28:24 -0700 Subject: [PATCH] Fix BruteForce test trying to validate empty memories This test was complaining if the driver refused to validate a memory it returned. However, it was trying to validate empty memories, which while those should be consistent, isn't really what the test was trying to enforce. So, skip memories that are empty there. --- tests/driver_xfails.yaml | 36 ------------------------------------ tests/test_brute_force.py | 4 +++- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/tests/driver_xfails.yaml b/tests/driver_xfails.yaml index 60646563..a60b646f 100644 --- a/tests/driver_xfails.yaml +++ b/tests/driver_xfails.yaml @@ -13,50 +13,14 @@ BTECH_GMRS-20V2: - class: TestCaseBruteForce test: test_validate_all reason: Improper application of the duplex policy -BTECH_GMRS-V2: - - class: TestCaseBruteForce - test: test_validate_all - reason: Improper application of the duplex policy -BTECH_GMRS-50X1: - - class: TestCaseBruteForce - test: test_validate_all - reason: Improper application of the duplex policy BTECH_GMRS-50V2: - class: TestCaseBruteForce test: test_validate_all reason: Improper application of the duplex policy -BTECH_MURS-V2: - - class: TestCaseBruteForce - test: test_validate_all - reason: Improper application of the duplex policy Abbree_AR-730: - class: TestCaseBruteForce test: test_validate_all reason: Broken name stored in memory 256? -Radtel_RT-730: - - class: TestCaseBruteForce - test: test_validate_all - reason: Improper application of the duplex policy -Retevis_RB17P: - - class: TestCaseBruteForce - test: test_validate_all - reason: Improper application of the duplex policy -TIDRADIO_TD-H3: - - class: TestCaseBruteForce - test: test_validate_all - reason: Memory 3 stored with TX outside TX range -TIDRADIO_TD-H8: - - class: TestCaseBruteForce - test: test_validate_all - reason: Memory 6 stored with TX outside TX range -TIDRADIO_TD-H8-GMRS: - - class: TestCaseBruteForce - test: test_validate_all - reason: Memory 31 stored with TX outside gmrs bands -TIDRADIO_TD-H8-HAM: - - class: TestCaseBruteForce - test: test_validate_all - reason: Memory 31 stored with TX outside ham bands Yaesu_FT-90: - class: TestCaseBruteForce test: test_validate_all diff --git a/tests/test_brute_force.py b/tests/test_brute_force.py index f3bd68f9..01148687 100644 --- a/tests/test_brute_force.py +++ b/tests/test_brute_force.py @@ -197,11 +197,13 @@ class TestCaseBruteForce(base.DriverTest): lo, hi = self.rf.memory_bounds for i in range(lo, hi + 1): m1 = self.radio.get_memory(i) + if m1.empty: + continue errs, warns = chirp_common.split_validation_msgs( self.radio.validate_memory(m1)) self.assertEqual([], errs, ('Radio has validation errors for memory %i ' - 'stored in sample image') % i) + 'stored in sample image: %s') % (i, m1)) @base.requires_feature('has_nostep_tuning', equal=False) def test_validate_all_steps(self):