@@ -2230,28 +2230,36 @@ def test_burn_ecdsa_key(self):
22302230
22312231
22322232class TestPostponedEfuses (EfuseTestCase ):
2233- def test_postpone_efuses (self ):
2233+ @pytest .mark .parametrize (
2234+ "postpone" ,
2235+ ["--postpone" , "--no-postpone" , "" ],
2236+ ids = ["postpone" , "no-postopone" , "default" ],
2237+ )
2238+ def test_postpone_efuses (self , postpone ):
22342239 if arg_chip == "esp32" :
2235- cmd = f"-- postpone \
2236- burn-efuse UART_DOWNLOAD_DIS 1 \
2240+ cmd = f"{ postpone } \
2241+ burn-efuse UART_DOWNLOAD_DIS 1 DISABLE_BT 1 \
22372242 burn-key BLOCK1 { IMAGES_DIR } /256bit \
22382243 burn-efuse ABS_DONE_1 1 FLASH_CRYPT_CNT 1"
22392244 num = 1
22402245 else :
22412246 sb_digest_name = (
22422247 "SECURE_BOOT_DIGEST" if arg_chip == "esp32c2" else "SECURE_BOOT_DIGEST0"
22432248 )
2244- cmd = f"-- postpone \
2249+ cmd = f"{ postpone } \
22452250 burn-efuse ENABLE_SECURITY_DOWNLOAD 1 DIS_DOWNLOAD_MODE 1 \
22462251 SECURE_VERSION 1 \
22472252 burn-key BLOCK_KEY0 { IMAGES_DIR } /256bit { sb_digest_name } \
22482253 burn-efuse SPI_BOOT_CRYPT_CNT 1 SECURE_BOOT_EN 1"
22492254 num = 3 if arg_chip == "esp32c2" else 4
22502255 output = self .espefuse_py (cmd )
22512256 assert f"BURN BLOCK{ num } - OK" in output
2252- assert "BURN BLOCK0 - OK" in output
2253- assert "Burn postponed eFuses from BLOCK0" in output
2254- assert "BURN BLOCK0 - OK" in output
2257+ if postpone == "--postpone" or postpone == "" :
2258+ assert "Burn postponed eFuses from BLOCK0" in output
2259+ assert 2 == output .count ("BURN BLOCK0 - OK" )
2260+ if postpone == "--no-postpone" :
2261+ assert 1 == output .count ("BURN BLOCK0 - OK" )
2262+ assert "Burn postponed eFuses from BLOCK0" not in output
22552263 assert "Successful" in output
22562264
22572265
0 commit comments