[ALOY-1043] Tooling: add script to compile all test apps and add _generated folders
|Fix Version/s||Alloy 1.7.0|
DescriptionTo 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:allscript. 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.
- Tim Poulsen 2014-12-15
Pull updates tools and docs for creating _generated code. It also includes generated code for all of the test/apps/testing apps.
1. From your Alloy repo directory, create a mock test app with
node tools/create_test.js fooIt 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. Run
node tools/create_generated_code.js testing/fooand check the folder. The _generated folder is present now. 4. Run
jake test:spec\[compile.js\] app=testing/fooIn 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.
- Tim Poulsen 2014-12-16 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
- Feon Sua Xin Miao 2014-12-17 PR merged.