Arduino-CI / arduino_ci

Unit testing and Continuous Integration (CI) for Arduino libraries, from a Ruby gem
Apache License 2.0
110 stars 34 forks source link

Improve factorization of "unused space" #335

Closed ianfixes closed 1 year ago

ianfixes commented 1 year ago

Use more sophisticated logic to calculate free space remaining

Regarding code contributed by @jgfoster in #308

          output = @backend.last_msg
          puts output
          i = output.index("leaving")
          free_space = output[i + 8..-1].to_i

We need to do the following:

  1. Move the space calculation into the backend
  2. Specify the units (Bytes, kB, etc) in the messaging for the CLI option
  3. Use a more sophisticated regex match to extract the number value, and possibly add unit testing for that
  4. Report space requirements as a separate check from the compilation itself