Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1043] Tooling: add script to compile all test apps and add _generated folders

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2014-12-17T08:42:49.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.7.0
ComponentsTooling
Labelsn/a
ReporterTim Poulsen
AssigneeTim Poulsen
Created2014-06-05T19:53:23.000+0000
Updated2014-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.

Comments

  1. Tim Poulsen 2014-12-15

    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. Run node tools/create_generated_code.js testing/foo and check the folder. The _generated folder is present now. 4. Run jake 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.
  2. 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
  3. Feon Sua Xin Miao 2014-12-17

    PR merged.

JSON Source