Skip to content

Conversation

@iainbeeston
Copy link

@iainbeeston iainbeeston commented Feb 26, 2025

Why

When testing an android app with maestro, the bash script that's generated relies the globstar option. This is only available on bash 4 or higher but mac os only comes with bash 3 (and will probably never move to bash 4 or 5 because they use the gplv3 license). Because of this if you run eas -p android --local on a mac the build will fail with this error (if the build runs maestro):

shopt: globstar: invalid shell option name

Here's a screenshot of the logs I see when I try to build locally on mac:

Screenshot 2025-02-26 at 15 30 18

How

To resolve this and support bash 3 I've refactored the maestro test code to use find rather than globstar, which should make it possible to run local builds on mac.

This screenshot is the same section of the build as before but using this branch:

Screenshot 2025-02-27 at 14 42 22

Test Plan

To test this you will need an eas build that runs maestro tests and has an android configuration.

  • This should change nothing about builds on ios or android builds made on linux
  • On main, when running using bash 3 the build should fail when trying to start maestro with this error: "shopt: globstar: invalid shell option name", but on this branch it should successfully run the tests. It should be possible to test this either on mac or on linux when using old (<4) versions of bash.

When testing an android app with maestro, the bash script that's generated relies the globstar option. This is only available on bash 4 or higher but mac os only comes with bash 3 (and will probably never move to bash 4 or 5 because they use the gplv3 license). Because of this if you run `eas -p android --local` on a mac the build will fail with this error (if the build runs maestro):

    shopt: globstar: invalid shell option name

To resolve this and support bash 3 I've refactored the maestro test code to use `find` rather than globstar, which should make it possible to run local builds on mac.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants