New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run generator tests on Travis #2111
Run generator tests on Travis #2111
Conversation
loadSelected(); | ||
}) | ||
}) | ||
.pause(10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are 10 second pauses the only way to make sure this works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be. I'll look into it.
tests/scripts/run_generators.sh
Outdated
local tmp_filename="${TMP_DIR}generated.$suffix" | ||
if [ ! -f $tmp_filename ]; then | ||
echo "File $tmp_filename not found!" | ||
FAILURE_COUNT=$((FAILURE_COUNT+1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this return if the file doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to do the next steps if the file is found, and otherwise simply report the error.
tests/scripts/run_generators.sh
Outdated
local golden_filename="${GOLDEN_DIR}generated.$suffix" | ||
if [ ! -f $golden_filename ]; then | ||
echo "File $golden_filename not found!" | ||
FAILURE_COUNT=$((FAILURE_COUNT+1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis is failing on OSX because it can't find the firefox driver. I'm investigating.
tests/scripts/run_generators.sh
Outdated
local tmp_filename="${TMP_DIR}generated.$suffix" | ||
if [ ! -f $tmp_filename ]; then | ||
echo "File $tmp_filename not found!" | ||
FAILURE_COUNT=$((FAILURE_COUNT+1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to do the next steps if the file is found, and otherwise simply report the error.
tests/scripts/run_generators.sh
Outdated
local golden_filename="${GOLDEN_DIR}generated.$suffix" | ||
if [ ! -f $golden_filename ]; then | ||
echo "File $golden_filename not found!" | ||
FAILURE_COUNT=$((FAILURE_COUNT+1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
loadSelected(); | ||
}) | ||
}) | ||
.pause(10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be. I'll look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once you get the mac build working.
e1299b7
to
b33d832
Compare
The basics
The details
Resolves
Generator tests have not previously been scripted.
Proposed Changes
For each language:
I also updated some of the test names to get rid of name conflicts in functions between text and list test, which were causing some tests to not be run when loading all of the tests with appendDomToWorkspace.
I verified this fix by checking that the same number of tests are run when loading test suites individually and when loading them all together.
Reason for Changes
Generator tests are frustrating.
Test Coverage
Tested by running the run_all_tests script locally. I also ran the golden code for each language and verified that all tests pass. For PHP I removed the known broken generated code (see #1201) and verified that the rest of the generated code works.