Skip to content
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

Minor changes and fixes for new test suite #583

Merged
merged 23 commits into from
Jul 9, 2016

Conversation

mpeterv
Copy link
Contributor

@mpeterv mpeterv commented Jul 8, 2016

This is just a heap of commits adjusting the new test suite a little. Not sure if this can be merged completely, will probably refine and cherry-pick commits one by one.

So far I like the new test suite a lot. Implementing it using busted allows us to later improve it further:

  • Make it Windows-compatible
  • Try to reduce output noise for successful tests. Typically in busted specs tests don't output anything at all if they pass. On failure, assertion that failed should provide enough information for debugging. This is definitely not true for assert.is_true and assert.is_false assertions that are used when checking command success and failure (it just prints: expected true, got false). If we'll go this way we'll need custom assertions that execute command and print it and its output on unexpected result. A collections of such assertions would be valuable for testing other command-line programs, might want to make that a library.

mpeterv added 23 commits July 8, 2016 12:04
Install python 2 and avoid using virtualenv, pip on osx works fine
without it.

Also remove unnecessary path prefix and add newline at the end.
When parsing test options, instead of directly looking
for '-Xhelper' in arguments and splitting the next arguments on commas
add .busted config to set test/test_environment as busted helper.
Then busted will do the splitting on its own and set global arg to
split options.
Return false if installation failed. Also, remove optional arguments.
Use it instead of os.rename(path, path).
@hishamhm
Copy link
Member

hishamhm commented Jul 8, 2016

Wow, thanks Peter! That's a thorough review! I'm glad you like the new test suite, @robooo has been putting a lot of work on it (and it's awesome that we already got it to a mergeable state and he's still basically halfway through his GSoC!)

If both you and @robooo are fine with all these changes, I think they are good to merge.

@mpeterv mpeterv merged commit 8e55688 into luarocks:master Jul 9, 2016
@mpeterv mpeterv deleted the adjust-new-tests branch July 9, 2016 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants