[ALOY-1043] Tooling: add script to compile all test apps and add _generated folders
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2014-12-17T08:42:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.7.0 |
Components | Tooling |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Tim Poulsen |
Created | 2014-06-05T19:53:23.000+0000 |
Updated | 2014-12-17T08:42:49.000+0000 |
Description
To improve our testing, we should have _generated folders (containing generated code for each platform) that can be compared to with each run of the
jake test:all
script.
It should:
* Process each project in the test/apps folder tree
* Compile the app for each platform, saving the results to _generated/PLATFORM/alloy/controllers
* Offer a switch (--force
) which if set, will overwrite existing _generated files
The test/testgen.js looks to accomplish this for an individual sample app. There's also the partially complete tools/compiles.js that might serve similar purpose.
PR https://github.com/appcelerator/alloy/pull/632 Pull updates tools and docs for creating _generated code. It also includes generated code for all of the test/apps/testing apps. Functional review: 1. From your Alloy repo directory, create a mock test app with
node tools/create_test.js foo
It should output a message directing you to create _generated code. 2. Open the test/apps/testing/foo folder to confirm that the app's files are present, but a _generated folder is not. 3. Runnode tools/create_generated_code.js testing/foo
and check the folder. The _generated folder is present now. 4. Runjake test:spec\[compile.js\] app=testing/foo
In the resulting output, you should see that "testing generated code" is present and passes (in other words, the code is compiled and compared to that in _generated and is found to match). 5. Finally, open tools/README.md to confirm that new instructions for Alloy developers is present.Updated PR removes _generated code containing dates, which are localized and thus won't pass if the reviewer is in a different timezone than the generator. Updated the generation script to bypass known-problem test apps. Updated the README.md file. I also added documentation to https://wiki.appcelerator.org/display/pe/Tools+and+techniques#Toolsandtechniques-nodetools and https://wiki.appcelerator.org/display/pe/Alloy+development+process
PR merged.