diff --git a/tests/utils/context.py b/tests/utils/context.py index b46a425e..f3016dbe 100644 --- a/tests/utils/context.py +++ b/tests/utils/context.py @@ -35,6 +35,7 @@ KICAD_VERSION_7_0_10 = 7000010 KICAD_VERSION_7_0_11 = 7000011 KICAD_VERSION_8_0_0 = 7099000 +KICAD_VERSION_9_0_0 = 9000000 MODE_SCH = 1 MODE_PCB = 0 # Defined as True to collect real world queries @@ -54,10 +55,12 @@ kicad_version = kicad_major*1000000+kicad_minor*1000+kicad_patch if kicad_version >= KICAD_VERSION_5_99: km = kicad_major+(0 if kicad_minor < 99 else 1) - if km > 8: - km = 8 + if km > 9: + km = 9 BOARDS_DIR = '../board_samples/kicad_'+str(km) - if kicad_version >= KICAD_VERSION_8_0_0: + if kicad_version >= KICAD_VERSION_9_0_0: + REF_DIR = 'tests/reference/9_0_0' + elif kicad_version >= KICAD_VERSION_8_0_0: REF_DIR = 'tests/reference/8_0_0' elif kicad_version >= KICAD_VERSION_7_0_11 and 'rc' in build_version: REF_DIR = 'tests/reference/stable_nightly' @@ -102,6 +105,10 @@ logging.debug('Detected KiCad v{}.{}.{} ({})'.format(kicad_major, kicad_minor, kicad_patch, kicad_version)) +def ki9(): + return kicad_version >= KICAD_VERSION_9_0_0 + + def ki8(): return kicad_version >= KICAD_VERSION_8_0_0