slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.33k stars 1.3k forks source link

Slice state invalidation is not well-tested #4365

Open lordofhyphens opened 6 years ago

lordofhyphens commented 6 years ago

Version

1869b06

The tests for libslic3r could use more fleshing out around the invalidation logic (changing what config options invalidates what).

The only real complexity here is that some reverse-engineering needs to be done around the invalidation of regions to properly test things like perimeters (you need to set up some model objects, etc).

Ideally, I think that every configuration option that Slic3r supports should have its behavior tested for regression purposes, but I think that testing the important representative samples will get us by for now.

Related to #4364

Refer to 7b8369d for a simple example (invalidating skirt step based on changing skirt count).

lordofhyphens commented 6 years ago

Quickly running the tests on Windows (this assumes you can build Slic3r and have built it at least once)

  1. Open up an instance of powershell.
  2. Go to the slic3r/xs directory in powershell.
  3. Run the following (replacing /path/towith the actual path to your Slic3r checkout): Invoke-Expression "$(perl -Mlocal::lib=/path/to/slic3r/local-lib)"
  4. Run perl t/20_print.t to execute the single test.

For Linux or OSX (using bash):

  1. Open up an instance of a terminal.
  2. Go to the slic3r/xs directory in the terminal.
  3. Run the following (replacing /path/to with the actual path to your Slic3r checkout): eval "$(perl -Mlocal::lib=/path/to/slic3r/local-lib)"
  4. Run perl t/20_print.t to execute the single test.