kparzysz-quic commented on code in PR #12504: URL: https://github.com/apache/tvm/pull/12504#discussion_r950614799
########## python/tvm/contrib/hexagon/pytest_plugin.py: ########## @@ -56,14 +56,19 @@ def _compose(args, decs): requires_hexagon_toolchain = tvm.testing.requires_hexagon(support_required="compile-only") [email protected](scope="session") def android_serial_number() -> Optional[str]: Review Comment: This function no longer returns `Optional[str]`. Please make it return `list[str]` for all cases, for consistency (including `[]` if there is no device of any kind). ########## python/tvm/contrib/hexagon/pytest_plugin.py: ########## @@ -56,14 +56,19 @@ def _compose(args, decs): requires_hexagon_toolchain = tvm.testing.requires_hexagon(support_required="compile-only") [email protected](scope="session") def android_serial_number() -> Optional[str]: + """Return the android serial number or simulator""" serial = os.getenv(ANDROID_SERIAL_NUMBER, default="") # Setting ANDROID_SERIAL_NUMBER to an empty string should be # equivalent to having it unset. if not serial.strip(): serial = None - return serial + if serial == "simulator": + return serial + else: + # Split android serial numbers into a list + serial = serial.split(",") Review Comment: This will fail if serial was set to `None` at L65. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
