@@ -779,44 +779,17 @@ def test_core_list_outdated_core(run_command):
779
779
assert installed_version .compare (latest_version ) == - 1
780
780
781
781
782
- def test_core_loading_package_manager (run_command ):
783
- assert run_command (["update" ])
784
-
785
- # Install core
786
- url = "https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json" # noqa: E501
787
- assert run_command (["core" , "update-index" , f"--additional-urls={ url } " ])
788
- assert run_command ([
"core" ,
"install" ,
"attiny:[email protected] " ,
f"--additional-urls={ url } " ])
789
-
790
- # Verifies installed core is correctly found and name is set
791
- res = run_command (["core" , "list" , "--format" , "json" ])
792
- assert res .ok
793
- cores = json .loads (res .stdout )
794
- mapped = {core ["id" ]: core for core in cores }
795
- assert len (mapped ) == 1
796
- assert "attiny:avr" in mapped
797
- assert mapped ["attiny:avr" ]["name" ] == "attiny"
798
-
799
- # Uninstall the core: this should leave some residue:
800
- # tree ~/.arduino15/packages/
801
- # /home/umberto/.arduino15/packages/
802
- # ├── attiny
803
- # │ └── hardware
804
- # │ └── avr
805
- #
806
- # Please note that the folder avr is empty
807
-
808
- assert run_command (["core" , "uninstall" , "attiny:avr" ])
809
- result = run_command (["core" , "list" , "--format" , "json" ])
810
- assert result .ok
811
- assert not _in (result .stdout , "attiny:avr" )
782
+ def test_core_loading_package_manager (run_command , data_dir ):
783
+ # Create empty architecture folder (this condition is normally produced by `core uninstall`)
784
+ (Path (data_dir ) / "packages" / "foovendor" / "hardware" / "fooarch" ).mkdir (parents = True )
812
785
813
786
result = run_command (["core" , "list" , "--all" , "--format" , "json" ])
814
787
assert result .ok # this should not make the cli crash
815
788
816
789
817
790
def test_core_index_without_checksum (run_command ):
818
791
assert run_command (["config" , "init" , "--dest-dir" , "." ])
819
- url = "https://raw.githubusercontent.com/keyboardio/ArduinoCore-GD32-Keyboardio/main /package_gd32_index.json" # noqa: E501
792
+ url = "https://raw.githubusercontent.com/keyboardio/ArduinoCore-GD32-Keyboardio/ae5938af2f485910729e7d27aa233032a1cb4734 /package_gd32_index.json" # noqa: E501
820
793
assert run_command (["config" , "add" , "board_manager.additional_urls" , url ])
821
794
822
795
assert run_command (["core" , "update-index" ])
0 commit comments