diff --git a/emulation_system/tests/e2e/results/ot3_results.py b/emulation_system/tests/e2e/results/ot3_results.py index 2a8bdc63..587dc4d1 100644 --- a/emulation_system/tests/e2e/results/ot3_results.py +++ b/emulation_system/tests/e2e/results/ot3_results.py @@ -3,6 +3,8 @@ from dataclasses import dataclass from typing import Set, Type +from docker.models.containers import Container # type: ignore[import] + from tests.e2e.consts import ( ENTRYPOINT_MOUNT, MONOREPO_WHEEL_VOLUME, @@ -301,6 +303,42 @@ def get_actual_results( ) +@dataclass +class PipetteEeproms(ResultABC): + """Validate that pipette eeproms are correct.""" + + left_pipette_eeprom_file_has_content: bool + right_pipette_eeprom_file_has_content: bool + + @staticmethod + def _file_has_content(container: Container) -> bool: + return int(exec_in_container(container, "stat -c %s /eeprom/eeprom.bin")) > 0 + + @classmethod + def get_expected_results( + cls: Type["PipetteEeproms"], system_test_def: SystemTestDefinition + ) -> "PipetteEeproms": + """Generate expected pipette eeproms.""" + return cls( + left_pipette_eeprom_file_has_content=system_test_def.left_pipette_expected, + right_pipette_eeprom_file_has_content=system_test_def.right_pipette_expected, + ) + + @classmethod + def get_actual_results( + cls: Type["PipetteEeproms"], system_under_test: E2EHostSystem + ) -> "PipetteEeproms": + """Load actual pipette eeproms.""" + return cls( + left_pipette_eeprom_file_has_content=cls._file_has_content( + system_under_test.ot3_containers.left_pipette + ), + right_pipette_eeprom_file_has_content=cls._file_has_content( + system_under_test.ot3_containers.right_pipette + ), + ) + + @dataclass class OT3Result(ResultABC): """Collect all ot3 result classes into a single dataclass.""" @@ -311,6 +349,7 @@ class OT3Result(ResultABC): emulator_mounts: OT3EmulatorMounts builder_named_volumes: OT3FirmwareBuilderNamedVolumes binaries: OT3Binaries + pipette_eeproms: PipetteEeproms @classmethod def get_actual_results( @@ -330,6 +369,7 @@ def get_actual_results( system_under_test ), binaries=OT3Binaries.get_actual_results(system_under_test), + pipette_eeproms=PipetteEeproms.get_actual_results(system_under_test), ) @classmethod @@ -350,4 +390,5 @@ def get_expected_results( system_test_def ), binaries=OT3Binaries.get_expected_results(system_test_def), + pipette_eeproms=PipetteEeproms.get_expected_results(system_test_def), ) diff --git a/emulation_system/tests/e2e/system_mappings.py b/emulation_system/tests/e2e/system_mappings.py index fce0b10d..c90d19bd 100644 --- a/emulation_system/tests/e2e/system_mappings.py +++ b/emulation_system/tests/e2e/system_mappings.py @@ -25,6 +25,8 @@ ot3_firmware_build_args=BuildArgConfigurations.LATEST_BUILD_ARGS, opentrons_modules_build_args=BuildArgConfigurations.NO_BUILD_ARGS, module_configuration=ModuleConfiguration.NO_MODULES(), + left_pipette_expected=True, + right_pipette_expected=False, ) OT3_FIRMWARE_DEV = SystemTestDefinition( @@ -42,6 +44,8 @@ ot3_firmware_build_args=BuildArgConfigurations.LATEST_BUILD_ARGS, opentrons_modules_build_args=BuildArgConfigurations.NO_BUILD_ARGS, module_configuration=ModuleConfiguration.NO_MODULES(), + left_pipette_expected=False, + right_pipette_expected=True, ) OT3_AND_MODULES = SystemTestDefinition( @@ -64,6 +68,8 @@ fw_magnetic_module_names={"ot3-and-modules-magdeck"}, fw_temperature_module_names={"ot3-and-modules-tempdeck"}, ), + left_pipette_expected=True, + right_pipette_expected=True, ) _TEST_DEFS: Dict[str, SystemTestDefinition] = { diff --git a/emulation_system/tests/e2e/test_definition/system_test_definition.py b/emulation_system/tests/e2e/test_definition/system_test_definition.py index c2ca3f16..bd3701e9 100644 --- a/emulation_system/tests/e2e/test_definition/system_test_definition.py +++ b/emulation_system/tests/e2e/test_definition/system_test_definition.py @@ -67,3 +67,5 @@ class SystemTestDefinition: opentrons_modules_build_args: BuildArgConfigurations module_configuration: ModuleConfiguration + left_pipette_expected: bool + right_pipette_expected: bool diff --git a/samples/ci/ot3/ot3_remote.yaml b/samples/ci/ot3/ot3_remote.yaml index 6b748516..de84b2f7 100644 --- a/samples/ci/ot3/ot3_remote.yaml +++ b/samples/ci/ot3/ot3_remote.yaml @@ -20,7 +20,6 @@ robot: emulation-level: hardware hardware-specific-attributes: left-pipette: P1000 Multi - right-pipette: P50 Multi monorepo-source: latest ot3-firmware-source: latest diff --git a/samples/ci/team_specific_setups/ot3_firmware_development.yaml b/samples/ci/team_specific_setups/ot3_firmware_development.yaml index 724976be..840f0d1e 100644 --- a/samples/ci/team_specific_setups/ot3_firmware_development.yaml +++ b/samples/ci/team_specific_setups/ot3_firmware_development.yaml @@ -19,7 +19,6 @@ robot: hardware: ot3 emulation-level: hardware hardware-specific-attributes: - left-pipette: P1000 Multi right-pipette: P50 Multi monorepo-source: /home/runner/work/opentrons-emulation/opentrons-emulation/opentrons