Passed the same verbosity level to KiAuto scripts.
This commit is contained in:
parent
2b845d81a0
commit
57c517d02b
|
|
@ -152,7 +152,10 @@ def exec_with_retry(cmd):
|
|||
return ret
|
||||
|
||||
|
||||
def add_time_out_options(cmd):
|
||||
def add_extra_options(cmd):
|
||||
if GS.debug_enabled:
|
||||
cmd.insert(1, '-'+'v'*GS.debug_level)
|
||||
cmd.insert(1, '-r')
|
||||
if GS.global_kiauto_time_out_scale:
|
||||
cmd.insert(1, str(GS.global_kiauto_time_out_scale))
|
||||
cmd.insert(1, '--time_out_scale')
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from tempfile import NamedTemporaryFile
|
|||
from .pre_base import BasePreFlight
|
||||
from .error import (KiPlotConfigurationError)
|
||||
from .gs import (GS)
|
||||
from .kiplot import check_script, exec_with_retry, add_time_out_options
|
||||
from .kiplot import check_script, exec_with_retry, add_extra_options
|
||||
from .misc import (CMD_PCBNEW_PRINT_LAYERS, URL_PCBNEW_PRINT_LAYERS, PDF_PCB_PRINT, KICAD_VERSION_5_99)
|
||||
from .out_base import VariantOptions
|
||||
from .macros import macros, document, output_class # noqa: F401
|
||||
|
|
@ -111,10 +111,7 @@ class PDF_Pcb_PrintOptions(VariantOptions):
|
|||
cmd.append('--mirror')
|
||||
board_name, proj_name = self.filter_components(GS.board)
|
||||
cmd.extend([board_name, output_dir])
|
||||
if GS.debug_enabled:
|
||||
cmd.insert(1, '-vv')
|
||||
cmd.insert(1, '-r')
|
||||
cmd = add_time_out_options(cmd)
|
||||
cmd = add_extra_options(cmd)
|
||||
# Add the layers
|
||||
cmd.extend([la.layer for la in layers])
|
||||
# Execute it
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import os
|
|||
from tempfile import mkdtemp
|
||||
from shutil import rmtree
|
||||
from .gs import (GS)
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, add_time_out_options
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, add_extra_options
|
||||
from .misc import (CMD_EESCHEMA_DO, PDF_SCH_PRINT)
|
||||
from .out_base import VariantOptions
|
||||
from .macros import macros, document, output_class # noqa: F401
|
||||
|
|
@ -47,10 +47,7 @@ class PDF_Sch_PrintOptions(VariantOptions):
|
|||
sch_dir = None
|
||||
sch_file = GS.sch_file
|
||||
cmd = [CMD_EESCHEMA_DO, 'export', '--all_pages', '--file_format', 'pdf', sch_file, output_dir]
|
||||
if GS.debug_enabled:
|
||||
cmd.insert(1, '-vv')
|
||||
cmd.insert(1, '-r')
|
||||
cmd = add_time_out_options(cmd)
|
||||
cmd = add_extra_options(cmd)
|
||||
ret = exec_with_retry(cmd)
|
||||
if ret:
|
||||
logger.error(CMD_EESCHEMA_DO+' returned %d', ret)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import os
|
|||
from tempfile import mkdtemp
|
||||
from shutil import rmtree
|
||||
from .gs import (GS)
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, add_time_out_options
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, add_extra_options
|
||||
from .misc import (CMD_EESCHEMA_DO, SVG_SCH_PRINT)
|
||||
from .out_base import VariantOptions
|
||||
from .macros import macros, document, output_class # noqa: F401
|
||||
|
|
@ -44,10 +44,7 @@ class SVG_Sch_PrintOptions(VariantOptions):
|
|||
sch_dir = None
|
||||
sch_file = GS.sch_file
|
||||
cmd = [CMD_EESCHEMA_DO, 'export', '--all_pages', '--file_format', 'svg', sch_file, output_dir]
|
||||
if GS.debug_enabled:
|
||||
cmd.insert(1, '-vv')
|
||||
cmd.insert(1, '-r')
|
||||
cmd = add_time_out_options(cmd)
|
||||
cmd = add_extra_options(cmd)
|
||||
ret = exec_with_retry(cmd)
|
||||
if ret:
|
||||
logger.error(CMD_EESCHEMA_DO+' returned %d', ret)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from .macros import macros, pre_class # noqa: F401
|
|||
from .error import (KiPlotConfigurationError)
|
||||
from .gs import (GS)
|
||||
from .optionable import Optionable
|
||||
from .kiplot import check_script, exec_with_retry, load_board, add_time_out_options
|
||||
from .kiplot import check_script, exec_with_retry, load_board, add_extra_options
|
||||
from .misc import (CMD_PCBNEW_RUN_DRC, URL_PCBNEW_RUN_DRC, DRC_ERROR)
|
||||
from .log import (get_logger)
|
||||
|
||||
|
|
@ -43,10 +43,7 @@ class Run_DRC(BasePreFlight): # noqa: F821
|
|||
cmd.append('-i')
|
||||
cmd.extend([GS.pcb_file, GS.out_dir])
|
||||
# If we are in verbose mode enable debug in the child
|
||||
if GS.debug_enabled:
|
||||
cmd.insert(1, '-vv')
|
||||
cmd.insert(1, '-r')
|
||||
cmd = add_time_out_options(cmd)
|
||||
cmd = add_extra_options(cmd)
|
||||
logger.info('- Running the DRC')
|
||||
ret = exec_with_retry(cmd)
|
||||
if ret:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from sys import (exit)
|
|||
from .macros import macros, pre_class # noqa: F401
|
||||
from .gs import (GS)
|
||||
from .optionable import Optionable
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, load_sch, add_time_out_options
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, load_sch, add_extra_options
|
||||
from .error import (KiPlotConfigurationError)
|
||||
from .misc import (CMD_EESCHEMA_DO, ERC_ERROR)
|
||||
from .log import (get_logger)
|
||||
|
|
@ -43,10 +43,7 @@ class Run_ERC(BasePreFlight): # noqa: F821
|
|||
cmd.extend(['-f', GS.filter_file])
|
||||
cmd.extend([GS.sch_file, GS.out_dir])
|
||||
# If we are in verbose mode enable debug in the child
|
||||
if GS.debug_enabled:
|
||||
cmd.insert(1, '-vv')
|
||||
cmd.insert(1, '-r')
|
||||
cmd = add_time_out_options(cmd)
|
||||
cmd = add_extra_options(cmd)
|
||||
logger.info('- Running the ERC')
|
||||
ret = exec_with_retry(cmd)
|
||||
if ret:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from sys import (exit)
|
|||
from .macros import macros, pre_class # noqa: F401
|
||||
from .error import (KiPlotConfigurationError)
|
||||
from .gs import (GS)
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, add_time_out_options
|
||||
from .kiplot import check_eeschema_do, exec_with_retry, add_extra_options
|
||||
from .misc import (CMD_EESCHEMA_DO, BOM_ERROR)
|
||||
from .log import (get_logger)
|
||||
|
||||
|
|
@ -34,10 +34,7 @@ class Update_XML(BasePreFlight): # noqa: F821
|
|||
check_eeschema_do()
|
||||
cmd = [CMD_EESCHEMA_DO, 'bom_xml', GS.sch_file, GS.out_dir]
|
||||
# If we are in verbose mode enable debug in the child
|
||||
if GS.debug_enabled:
|
||||
cmd.insert(1, '-vv')
|
||||
cmd.insert(1, '-r')
|
||||
cmd = add_time_out_options(cmd)
|
||||
cmd = add_extra_options(cmd)
|
||||
logger.info('- Updating BoM in XML format')
|
||||
ret = exec_with_retry(cmd)
|
||||
if ret:
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ class TestContext(object):
|
|||
# One is enough, 2 can generate tons of data when loading libs
|
||||
cmd.append('-v')
|
||||
if extra_debug:
|
||||
cmd.append('-vv')
|
||||
cmd.append('-vvv')
|
||||
if not no_board_file:
|
||||
if self.mode == MODE_PCB:
|
||||
cmd = cmd+['-b', filename if filename else self.board_file]
|
||||
|
|
|
|||
Loading…
Reference in New Issue