Attempt a better fix for CI paths in kicad-cli tests

Also check in other default configs
This commit is contained in:
Jon Evans
2025-02-22 13:37:48 -05:00
parent 8d7d769bb6
commit 78d117bf3b
6 changed files with 893 additions and 5 deletions
+3
View File
@@ -0,0 +1,3 @@
(design_block_lib_table
(version 7)
)
+371
View File
@@ -0,0 +1,371 @@
{
"annotation": {
"automatic": true,
"messages_filter": -1,
"method": 0,
"options": 0,
"recursive": true,
"scope": 0,
"sort_order": 0
},
"appearance": {
"color_theme": "_builtin_default",
"default_font": "KiCad Font",
"edit_label_height": -1,
"edit_label_visible_columns": "0 1 2 3 4 5 6 7",
"edit_label_width": -1,
"edit_sheet_height": -1,
"edit_sheet_visible_columns": "0 1 2 3 4 5 6 7",
"edit_sheet_width": -1,
"edit_symbol_height": -1,
"edit_symbol_visible_columns": "0 1 2 3 4 5 6 7",
"edit_symbol_width": -1,
"erc_severities": 48,
"footprint_preview": true,
"mark_sim_exclusions": true,
"print_sheet_reference": true,
"show_directive_labels": true,
"show_erc_errors": true,
"show_erc_exclusions": false,
"show_erc_warnings": true,
"show_hidden_fields": false,
"show_hidden_pins": false,
"show_illegal_symbol_lib_dialog": true,
"show_op_currents": true,
"show_op_voltages": true,
"show_page_limits": true,
"show_pin_alt_icons": true,
"show_sexpr_file_convert_warning": true,
"show_sheet_filename_case_sensitivity_dialog": true
},
"aui": {
"design_blocks_panel_docked_width": -1,
"design_blocks_panel_float_height": -1,
"design_blocks_panel_float_width": -1,
"design_blocks_show": false,
"float_net_nav_panel": false,
"hierarchy_panel_docked_height": -1,
"hierarchy_panel_docked_width": -1,
"hierarchy_panel_float_height": -1,
"hierarchy_panel_float_width": -1,
"net_nav_panel_docked_size": {
"height": -1,
"width": 120
},
"net_nav_panel_float_pos": {
"x": 50,
"y": 200
},
"net_nav_panel_float_size": {
"height": 200,
"width": 200
},
"properties_panel_width": -1,
"properties_splitter_proportion": 0.5,
"schematic_hierarchy_float": false,
"search_panel_dock_direction": 3,
"search_panel_height": -1,
"search_panel_width": -1,
"show_net_nav_panel": false,
"show_properties": true,
"show_schematic_hierarchy": true,
"show_search": false
},
"autoplace_fields": {
"align_to_grid": true,
"allow_rejustify": true,
"enable": true
},
"bom": {
"plugins": [
{
"command": "",
"name": "bom_csv_grouped_extra",
"path": "bom_csv_grouped_extra.py"
},
{
"command": "",
"name": "bom_csv_grouped_by_value",
"path": "bom_csv_grouped_by_value.py"
},
{
"command": "",
"name": "bom_csv_grouped_by_value_with_fp",
"path": "bom_csv_grouped_by_value_with_fp.py"
}
],
"selected_plugin": ""
},
"color_picker": {
"default_tab": 0
},
"cross_probing": {
"auto_highlight": true,
"center_on_items": true,
"on_selection": true,
"zoom_to_fit": true
},
"design_block_chooser": {
"height": -1,
"keep_annotations": false,
"lib_tree": {
"column_widths": null
},
"place_as_sheet": false,
"repeated_placement": false,
"sash_pos_h": -1,
"sash_pos_v": -1,
"sort_mode": 0,
"width": -1
},
"drawing": {
"auto_start_wires": true,
"default_bus_thickness": 12,
"default_junction_size": 36,
"default_line_thickness": 6,
"default_repeat_offset_x": 0,
"default_repeat_offset_y": 100,
"default_sheet_background_color": "rgba(0, 0, 0, 0.000)",
"default_sheet_border_color": "rgba(0, 0, 0, 0.000)",
"default_text_size": 50,
"default_wire_thickness": 6,
"field_names": "",
"junction_size_choice": 3,
"junction_size_mult_list": [
0.0,
1.7,
4.0,
6.0,
9.0,
12.0
],
"line_mode": 1,
"pin_symbol_size": 25,
"repeat_label_increment": 1,
"text_offset_ratio": 0.08
},
"field_editor": {
"export_filename": "",
"field_widths": {},
"height": 0,
"page": 0,
"scope": 0,
"selection_mode": 0,
"width": 0
},
"find_replace": {
"find_history": [],
"find_string": "",
"match_case": false,
"match_mode": 0,
"replace_history": [],
"replace_references": false,
"replace_string": "",
"search_all_fields": false,
"search_all_pins": false,
"search_and_replace": false,
"search_current_sheet_only": false
},
"graphics": {
"canvas_type": 1,
"highlight_factor": 0.5,
"select_factor": 0.75
},
"import_graphics": {
"dxf_units": 0,
"interactive_placement": true,
"line_width": 0.2,
"line_width_units": 0,
"origin_units": 0,
"origin_x": 0.0,
"origin_y": 0.0
},
"input": {
"drag_is_move": false,
"esc_clears_net_highlight": true
},
"lib_tree": {
"column_widths": null,
"columns": [],
"open_libs": []
},
"lib_view": {
"cmp_list_width": 150,
"lib_list_width": 150,
"show_pin_electrical_type": true,
"window": {
"display": 0,
"maximized": false,
"perspective": "",
"pos_x": 0,
"pos_y": 0,
"size_x": 500,
"size_y": 400
}
},
"meta": {
"version": 3
},
"netlist": {
"plugins": []
},
"page_settings": {
"export_comment1": false,
"export_comment2": false,
"export_comment3": false,
"export_comment4": false,
"export_comment5": false,
"export_comment6": false,
"export_comment7": false,
"export_comment8": false,
"export_comment9": false,
"export_company": false,
"export_date": false,
"export_paper": false,
"export_revision": false,
"export_title": false
},
"plot": {
"background_color": false,
"color": true,
"color_theme": "user",
"format": 0,
"frame_reference": true,
"hpgl_origin": 0,
"hpgl_paper_size": 0,
"hpgl_pen_size": 0.5,
"other_open_file_after_plot": false,
"pdf_hierarchical_links": true,
"pdf_metadata": true,
"pdf_property_popups": true
},
"plugins": {
"actions": []
},
"printing": {
"background": false,
"color_theme": "",
"layers": [],
"monochrome": true,
"scale": 1.0,
"title_block": false,
"use_theme": false
},
"search_pane": {
"selection_zoom": 1
},
"selection": {
"draw_selected_children": true,
"fill_shapes": false,
"highlight_netclass_colors": false,
"highlight_netclass_colors_alpha": 0.6,
"highlight_netclass_colors_thickness": 15,
"highlight_thickness": 2,
"thickness": 3
},
"simulator": {
"cursors_panel_height": 0,
"measurements_panel_height": 0,
"mouse_wheel_actions": {
"horizontal": 0,
"vertical_unmodified": 4,
"vertical_with_alt": 0,
"vertical_with_ctrl": 1,
"vertical_with_shift": 3
},
"plot_panel_height": 0,
"plot_panel_width": 0,
"signal_panel_height": 0,
"white_background": false,
"window": {
"display": 0,
"maximized": false,
"perspective": "",
"pos_x": 0,
"pos_y": 0,
"size_x": 500,
"size_y": 400
}
},
"symbol_chooser": {
"height": -1,
"keep_symbol": false,
"place_all_units": true,
"sash_pos_h": -1,
"sash_pos_v": -1,
"sort_mode": 0,
"width": -1
},
"system": {
"file_history": [],
"first_run_shown": false,
"last_imperial_units": 5,
"last_metric_units": 1,
"last_symbol_lib_dir": "",
"max_undo_items": 0,
"never_show_rescue_dialog": false,
"show_import_issues": true,
"units": 5
},
"window": {
"cursor": {
"always_show_cursor": true,
"fullscreen_cursor": false
},
"display": 0,
"grid": {
"axes_enabled": false,
"fast_grid_1": 1,
"fast_grid_2": 2,
"last_size": 1,
"line_width": 1.0,
"min_spacing": 10.0,
"override_connected": true,
"override_connected_idx": 1,
"override_graphics": false,
"override_graphics_idx": 2,
"override_text": true,
"override_text_idx": 3,
"override_vias": false,
"override_vias_idx": 0,
"override_wires": true,
"override_wires_idx": 1,
"overrides_enabled": true,
"show": true,
"sizes": [
{
"name": "",
"x": "100 mil",
"y": "100 mil"
},
{
"name": "",
"x": "50 mil",
"y": "50 mil"
},
{
"name": "",
"x": "25 mil",
"y": "25 mil"
},
{
"name": "",
"x": "10 mil",
"y": "10 mil"
}
],
"snap": 0,
"style": 0,
"user_grid_x": "",
"user_grid_y": ""
},
"maximized": false,
"mru_path": "",
"perspective": "",
"pos_x": 0,
"pos_y": 0,
"size_x": 0,
"size_y": 0,
"zoom_factors": []
}
}
+242
View File
@@ -0,0 +1,242 @@
{
"appearance": {
"color_theme": "_builtin_default",
"left_frame_width": 200
},
"color_picker": {
"default_tab": 0
},
"cross_probing": {
"auto_highlight": true,
"center_on_items": true,
"on_selection": true,
"zoom_to_fit": true
},
"find_replace": {
"find_history": [],
"find_string": "",
"match_case": false,
"match_mode": 0,
"replace_history": [],
"replace_string": "",
"search_and_replace": false
},
"graphics": {
"canvas_type": 1,
"highlight_factor": 0.5,
"select_factor": 0.75
},
"lib_tree": {
"column_widths": null,
"columns": [],
"open_libs": []
},
"meta": {
"version": 0
},
"pcm": {
"check_for_updates": true,
"last_download_dir": "",
"lib_auto_add": true,
"lib_auto_remove": true,
"lib_prefix": "PCM_",
"repositories": [
{
"name": "KiCad official repository",
"url": "https://repository.kicad.org/repository.json"
}
]
},
"plugins": {
"actions": []
},
"printing": {
"background": false,
"color_theme": "",
"layers": [],
"monochrome": true,
"scale": 1.0,
"title_block": false,
"use_theme": false
},
"search_pane": {
"selection_zoom": 1
},
"system": {
"check_for_kicad_updates": true,
"file_history": [],
"first_run_shown": false,
"last_design_block_lib_dir": "",
"last_imperial_units": 5,
"last_metric_units": 1,
"last_received_update": "",
"last_update_check_time": "",
"max_undo_items": 0,
"open_projects": [],
"show_import_issues": true,
"units": 1
},
"template": {
"window": {
"pos": {
"x": -1,
"y": -1
},
"size": {
"height": -1,
"width": -1
}
}
},
"window": {
"cursor": {
"always_show_cursor": true,
"fullscreen_cursor": false
},
"display": 0,
"grid": {
"axes_enabled": false,
"fast_grid_1": 15,
"fast_grid_2": 16,
"last_size": 15,
"line_width": 1.0,
"min_spacing": 10.0,
"override_connected": false,
"override_connected_idx": 16,
"override_graphics": false,
"override_graphics_idx": 15,
"override_text": false,
"override_text_idx": 18,
"override_vias": false,
"override_vias_idx": 18,
"override_wires": false,
"override_wires_idx": 19,
"overrides_enabled": true,
"show": true,
"sizes": [
{
"name": "",
"x": "1000 mil",
"y": "1000 mil"
},
{
"name": "",
"x": "500 mil",
"y": "500 mil"
},
{
"name": "",
"x": "250 mil",
"y": "250 mil"
},
{
"name": "",
"x": "200 mil",
"y": "200 mil"
},
{
"name": "",
"x": "100 mil",
"y": "100 mil"
},
{
"name": "",
"x": "50 mil",
"y": "50 mil"
},
{
"name": "",
"x": "25 mil",
"y": "25 mil"
},
{
"name": "",
"x": "20 mil",
"y": "20 mil"
},
{
"name": "",
"x": "10 mil",
"y": "10 mil"
},
{
"name": "",
"x": "5 mil",
"y": "5 mil"
},
{
"name": "",
"x": "2 mil",
"y": "2 mil"
},
{
"name": "",
"x": "1 mil",
"y": "1 mil"
},
{
"name": "",
"x": "5.0 mm",
"y": "5.0 mm"
},
{
"name": "",
"x": "2.5 mm",
"y": "2.5 mm"
},
{
"name": "",
"x": "1.0 mm",
"y": "1.0 mm"
},
{
"name": "",
"x": "0.5 mm",
"y": "0.5 mm"
},
{
"name": "",
"x": "0.25 mm",
"y": "0.25 mm"
},
{
"name": "",
"x": "0.2 mm",
"y": "0.2 mm"
},
{
"name": "",
"x": "0.1 mm",
"y": "0.1 mm"
},
{
"name": "",
"x": "0.05 mm",
"y": "0.05 mm"
},
{
"name": "",
"x": "0.025 mm",
"y": "0.025 mm"
},
{
"name": "",
"x": "0.01 mm",
"y": "0.01 mm"
}
],
"snap": 0,
"style": 0,
"user_grid_x": "",
"user_grid_y": ""
},
"maximized": false,
"mru_path": "",
"perspective": "",
"pos_x": 0,
"pos_y": 0,
"size_x": 0,
"size_y": 0,
"zoom_factors": []
}
}
+92
View File
@@ -0,0 +1,92 @@
{
"api": {
"enable_server": false,
"interpreter_path": "/Users/jon/src/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3"
},
"appearance": {
"grid_striping": false,
"hicontrast_dimming_factor": 0.800000011920929,
"show_scrollbars": false,
"text_editor_zoom": 0,
"toolbar_icon_size": 24,
"use_icons_in_menus": false
},
"auto_backup": {
"backup_on_autosave": false,
"enabled": true,
"limit_daily_files": 5,
"limit_total_files": 25,
"limit_total_size": 104857600,
"min_interval": 300
},
"do_not_show_again": {
"data_collection_prompt": false,
"env_var_overwrite_warning": false,
"scaled_3d_models_warning": false,
"update_check_prompt": false,
"zone_fill_warning": false
},
"environment": {
"vars": null
},
"git": {
"authorEmail": "",
"authorName": "",
"repositories": null,
"useDefaultAuthor": true
},
"graphics": {
"cairo_antialiasing_mode": 0,
"opengl_antialiasing_mode": 2
},
"input": {
"auto_pan": false,
"auto_pan_acceleration": 5,
"center_on_zoom": true,
"focus_follow_sch_pcb": false,
"horizontal_pan": false,
"hotkey_feedback": true,
"immediate_actions": true,
"mouse_left": -1,
"mouse_middle": 2,
"mouse_right": 2,
"reverse_scroll_pan_h": false,
"reverse_scroll_zoom": false,
"scroll_modifier_pan_h": 308,
"scroll_modifier_pan_v": 306,
"scroll_modifier_zoom": 0,
"warp_mouse_on_move": true,
"zoom_acceleration": false,
"zoom_speed": 5,
"zoom_speed_auto": true
},
"meta": {
"filename": "kicad_common.json",
"version": 3
},
"netclass_panel": {
"eeschema_shown_columns": "0 10 11 12 13",
"pcbnew_shown_columns": "0 1 2 3 4 5 6 7 8 9",
"sash_pos": 160
},
"package_manager": {
"sash_pos": 380
},
"session": {
"pinned_design_block_libs": [],
"pinned_fp_libs": [],
"pinned_symbol_libs": [],
"remember_open_files": false
},
"system": {
"autosave_interval": 600,
"clear_3d_cache_interval": 30,
"file_explorer": "",
"file_history_size": 9,
"language": "Default",
"pdf_viewer_name": "",
"text_editor": "/usr/bin/open -e",
"use_system_pdf_viewer": true,
"working_dir": "/Users/jon/src/kicad/qa/tests/cli"
}
}
+169
View File
@@ -0,0 +1,169 @@
{
"appearance": {
"color_theme": "_builtin_default"
},
"aui": {
"properties_panel_width": -1,
"properties_splitter_proportion": 0.5,
"show_properties": true
},
"color_picker": {
"default_tab": 0
},
"cross_probing": {
"auto_highlight": true,
"center_on_items": true,
"on_selection": true,
"zoom_to_fit": true
},
"defaults": {
"line_width": 0,
"pin_length": 100,
"pin_name_size": 50,
"pin_num_size": 50,
"text_size": 50
},
"drag_pins_along_with_edges": true,
"edit_symbol_visible_columns": "0 1 2 3 4 5 6 7",
"find_replace": {
"find_history": [],
"find_string": "",
"match_case": false,
"match_mode": 0,
"replace_history": [],
"replace_string": "",
"search_and_replace": false
},
"graphics": {
"canvas_type": 1,
"highlight_factor": 0.5,
"select_factor": 0.75
},
"import_graphics": {
"dxf_units": 0,
"interactive_placement": true,
"line_width": 0.2,
"line_width_units": 0,
"origin_units": 0,
"origin_x": 0.0,
"origin_y": 0.0
},
"lib_table_width": 250,
"lib_tree": {
"column_widths": null,
"columns": [],
"open_libs": []
},
"library": {
"sort_mode": 0
},
"meta": {
"version": 1
},
"pin_table_visible_columns": "0 1 2 3 4 5 9 10",
"plugins": {
"actions": []
},
"printing": {
"background": false,
"color_theme": "",
"layers": [],
"monochrome": true,
"scale": 1.0,
"title_block": false,
"use_theme": false
},
"repeat": {
"label_delta": 1,
"pin_step": 100
},
"search_pane": {
"selection_zoom": 1
},
"selection_filter": {
"graphics": true,
"images": true,
"labels": true,
"lockedItems": false,
"otherItems": true,
"pins": true,
"symbols": true,
"text": true,
"wires": true
},
"show_hidden_lib_fields": true,
"show_hidden_lib_pins": true,
"show_pin_alt_icons": true,
"show_pin_electrical_type": true,
"system": {
"file_history": [],
"first_run_shown": false,
"last_imperial_units": 5,
"last_metric_units": 1,
"max_undo_items": 0,
"show_import_issues": true,
"units": 5
},
"use_eeschema_color_settings": true,
"window": {
"cursor": {
"always_show_cursor": true,
"fullscreen_cursor": false
},
"display": 0,
"grid": {
"axes_enabled": false,
"fast_grid_1": 1,
"fast_grid_2": 2,
"last_size": 1,
"line_width": 1.0,
"min_spacing": 10.0,
"override_connected": true,
"override_connected_idx": 1,
"override_graphics": false,
"override_graphics_idx": 2,
"override_text": true,
"override_text_idx": 3,
"override_vias": false,
"override_vias_idx": 0,
"override_wires": true,
"override_wires_idx": 1,
"overrides_enabled": true,
"show": true,
"sizes": [
{
"name": "",
"x": "100 mil",
"y": "100 mil"
},
{
"name": "",
"x": "50 mil",
"y": "50 mil"
},
{
"name": "",
"x": "25 mil",
"y": "25 mil"
},
{
"name": "",
"x": "10 mil",
"y": "10 mil"
}
],
"snap": 0,
"style": 0,
"user_grid_x": "",
"user_grid_y": ""
},
"maximized": false,
"mru_path": "",
"perspective": "",
"pos_x": 0,
"pos_y": 0,
"size_x": 0,
"size_y": 0,
"zoom_factors": []
}
}
+16 -5
View File
@@ -22,6 +22,7 @@
import difflib
import os
import pathlib
import json
import cairosvg
@@ -51,12 +52,22 @@ def run_and_capture( command: list ) -> Tuple[ str, str, int ]:
if 'QA_DATA_ROOT' in env:
base_path = env.get('QA_DATA_ROOT')
else:
# cwd ./qa/tests/cli/
base_path = os.path.join(os.getcwd(), '../../data')
cwd = Path.cwd()
base_path = None
env['KICAD_CONFIG_HOME'] = os.path.join(base_path, 'config')
env['KICAD9_SYMBOL_DIR'] = os.path.join(base_path, 'libraries')
env['KICAD9_FOOTPRINT_DIR'] = os.path.join(base_path, 'libraries')
try:
if 'qa' in cwd.parts:
idx = cwd.parts.index('qa')
base_path = cwd.parents[len(cwd.parents) - idx - 1] / 'data'
except ValueError:
pass
if base_path is not None:
env['KICAD_CONFIG_HOME'] = str(base_path / 'config')
env['KICAD9_SYMBOL_DIR'] = str(base_path / 'libraries')
env['KICAD9_FOOTPRINT_DIR'] = str(base_path / 'libraries')
else:
logger.warning("Unexpected cwd '%s', tests will likely fail", cwd)
logger.info("Using environment \"%s\"", json.dumps(env, indent=2))