webstaff build/test failures related to IDL2js
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned |
Bug Description
webstaff build/test fails at the "grunt all" stage with output similar to the following:
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.37 server started at http://
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket E-V9KUKBTz4dsNO
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
SyntaxError: Unexpected EOF
at /home/opensrf/
PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (0.113 secs / 0 secs)
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
If you go choose to use "grunt all --force" to ignore the test failure warning, then the remaining tasks complete and in the end you do appear to have a functioning install, including webstaff.
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
When examining the file referenced in the test failure, we find that it is not valid Javascript, and the problem seems to be with SQL query strings being included, newlines and all.
Changes to the IDL in commit 91f844b introduced a requirement for additional pre-processing of the IDL before fm_IDL2js.xml can be expected to generate output that is valid Javascript.
OpenILS: :WWW::IDL2js was modified to perform this pre-processing, but there is one other stock consumer of fm_IDL2js.xsl at present:
Open-ILS/ web/js/ ui/default/ staff/test/ data/idl2js. pl is used to generate IDL2js.js which is then used in webstaff tests.
The working branch at user/jeff/ lp1618136_ fix_webstaff_ test_failures includes a proposed fix: simply add the pre-processing steps from OpenILS: :WWW::IDL2js to the test support script idl2js.pl
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ jeff/lp1618136_ fix_webstaff_ test_failures