2012-08-22 07:21:02 +04:00
|
|
|
Some work is needed to include these into the automated test suite.
|
|
|
|
For now, run them manually according to these instructions:
|
|
|
|
|
|
|
|
Compile OpenSCAD in debug mode. This will give console output related to module caching, e.g.:
|
|
|
|
/path/to/used.scad: 0x103612f70
|
|
|
|
Module cache size: 1 modules
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test1: Basic cache
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
2014-03-09 21:12:40 +04:00
|
|
|
o Turn off Design->Automatic Reload and Compile
|
2012-08-22 07:21:02 +04:00
|
|
|
o Open use.scad
|
|
|
|
o Compile twice (F5) - check that module reference is the same
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test2: Dependency tracking of USE
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open use.scad
|
|
|
|
o Compile (F5)
|
|
|
|
o touch used.scad
|
|
|
|
o Compile (F5) - check that the module reference changed
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test3: MCAD
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open use-mcad.scad
|
|
|
|
o Compile (F5)
|
|
|
|
o Check that you get a rounded box
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test5: Overload USEd module
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open moduleoverload.scad
|
|
|
|
o Compile (F5)
|
|
|
|
o Verify that you get a sphere rather than a cylinder
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test6: Recursive USE
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open recursivemain.scad
|
|
|
|
o Compile (F5)
|
|
|
|
o Verify that OpenSCAD won't hang or crash
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test7: Circular USE
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open circularmain.scad
|
|
|
|
o Compile (F5)
|
|
|
|
o Verify that OpenSCAD won't hang or crash
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test8: Dependency tracking of common file USEd by multiple modules
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open multiplemain.scad
|
|
|
|
o Compile (F5) - verify that you get a sphere and a cube of approximately the same size
|
|
|
|
o Edit multipleB.scad:
|
|
|
|
- cube(1.5*F(), center=true);
|
|
|
|
+ cube(2.5*F(), center=true);
|
|
|
|
o Reload and Compile (F4) - verify that the cube got larger
|
|
|
|
|
2012-10-24 04:40:45 +04:00
|
|
|
Test9: Dependency tracking of file included from module
|
2012-08-22 07:21:02 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open includefrommodule.scad
|
|
|
|
o Compile (F5) - Verify that you get a circular disc
|
|
|
|
o Edit radius.scad: Change RADIUS
|
|
|
|
o Compile (F5) - Verify that the disc changed size
|
|
|
|
|
2013-05-26 02:30:55 +04:00
|
|
|
Test10: Circular include
|
2012-10-24 04:40:45 +04:00
|
|
|
------
|
|
|
|
|
|
|
|
o Open circularincludemain.scad
|
|
|
|
o Compile (F5)
|
|
|
|
o Verify that OpenSCAD won't hang or crash
|
|
|
|
|
2013-05-26 02:30:55 +04:00
|
|
|
Test11: Missing include file appears
|
|
|
|
------
|
|
|
|
o rm missing.scad
|
|
|
|
o Open includemissing.scad
|
|
|
|
o Compile (F5)
|
2013-05-28 09:24:30 +04:00
|
|
|
o Verify that you get: WARNING: Can't open include file 'missing.scad'.
|
2013-05-26 02:30:55 +04:00
|
|
|
o echo "module missing() { sphere(10); }" > missing.scad
|
2013-05-31 00:51:00 +04:00
|
|
|
o Reload and Compile (F4) - verify that the sphere appeared
|
2013-05-26 02:30:55 +04:00
|
|
|
o rm missing.scad
|
2013-05-31 00:51:00 +04:00
|
|
|
o Reload and Compile (F4) - verify that the sphere is still there
|
|
|
|
o echo "module missing() { sphere(20); }" > missing.scad
|
|
|
|
o Reload and Compile (F4) - verify that the sphere increased in size
|
2013-05-26 02:30:55 +04:00
|
|
|
|
|
|
|
Test12: Missing include file in subpath appears
|
|
|
|
------
|
|
|
|
o rm subdir/missingsub.scad
|
|
|
|
o Open includemissingsub.scad
|
|
|
|
o Compile (F5)
|
2013-05-26 23:05:59 +04:00
|
|
|
o Verify that you get: WARNING: Can't open include file 'subdir/missingsub.scad'.
|
2013-05-26 02:30:55 +04:00
|
|
|
o echo "module missingsub() { sphere(10); }" > subdir/missingsub.scad
|
2013-05-31 00:51:00 +04:00
|
|
|
o Reload and Compile (F4) - verify that the sphere appeared
|
2013-05-26 02:30:55 +04:00
|
|
|
o rm subdir/missingsub.scad
|
2013-05-31 00:51:00 +04:00
|
|
|
o Reload and Compile (F4) - verify that the sphere is still there
|
|
|
|
o echo "module missingsub() { sphere(20); }" > subdir/missingsub.scad
|
|
|
|
o Reload and Compile (F4) - verify that the sphere increased in size
|
2013-05-27 05:55:00 +04:00
|
|
|
|
|
|
|
Test13: Missing library file appears
|
|
|
|
-------
|
|
|
|
o rm missing.scad
|
|
|
|
o Open usemissing.scad
|
|
|
|
o Compile (F5)
|
2013-05-31 00:51:00 +04:00
|
|
|
o Verify that you get: WARNING: Can't open library file 'missing.scad'.
|
2013-05-27 05:55:00 +04:00
|
|
|
o echo "module missing() { sphere(10); }" > missing.scad
|
2013-05-31 00:51:00 +04:00
|
|
|
o Reload and Compile (F4) - verify that the sphere appeared
|
2013-05-27 05:55:00 +04:00
|
|
|
o rm missing.scad
|
2013-05-31 00:51:00 +04:00
|
|
|
o Reload and Compile (F4) - verify that the sphere is still there
|
|
|
|
o echo "module missing() { sphere(20); }" > missing.scad
|
|
|
|
o Reload and Compile (F4) - verify that the sphere increased in size
|
2013-05-28 18:20:07 +04:00
|
|
|
|
|
|
|
Test14: Automatic reload of cascading changes
|
|
|
|
-------
|
|
|
|
|
2013-05-31 00:51:00 +04:00
|
|
|
o ./cascade.sh
|
2013-05-28 18:20:07 +04:00
|
|
|
o Open cascadetest.scad
|
2013-05-28 18:23:36 +04:00
|
|
|
o Turn on Automatic Reload and Compile
|
|
|
|
o Verify that the 4 objects render correctly
|
2013-05-31 00:51:00 +04:00
|
|
|
o rm cascadetest.scad
|
|
|
|
o Verify that no rerendering was triggered (the 4 objects are still there)
|
|
|
|
o rm cascade*.scad
|
|
|
|
o Verify that no rerendering was triggered (the 4 objects are still there)
|
|
|
|
o ./cascade2.sh
|
2013-05-28 18:20:07 +04:00
|
|
|
o Verify that everything reloads at once without flickering
|
2014-02-10 01:26:43 +04:00
|
|
|
|
|
|
|
Test 15: Correct handling of compile errors in auto-reloaded modules
|
|
|
|
--------
|
|
|
|
o Turn on Automatic Reload and Compile
|
|
|
|
o Open mainusingerror.scad
|
|
|
|
o Verify that you get:
|
|
|
|
- Compiling library '.../error.scad'.
|
|
|
|
- Parser error in line 3: syntax error
|
|
|
|
- WARNING: Failed to compile library '.../error.scad'.
|
|
|
|
- Main file should keep compiling
|
|
|
|
o Verify that the above doesn't repeat
|
2014-02-10 11:18:50 +04:00
|
|
|
|
|
|
|
Test 16: Dependency tracking of underlying dependencies
|
|
|
|
--------
|
|
|
|
o Turn on Automatic Reload and Compile
|
|
|
|
o Open mainsubsub.scad
|
|
|
|
o Verify that you see a red cylinder
|
2014-03-09 23:04:07 +04:00
|
|
|
o edit subdir/subsub.scad: Change color
|
2014-02-10 11:18:50 +04:00
|
|
|
o Verify that color changes
|