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

Add test for fixed parsing of goto. #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

DemiMarie
Copy link

Also update test for changes to the table library.

Also update test for changes to the table library.
This adds many FFI tests to the test runner.  It also fixes loading
of C libraries by the test suite, by loading them before the global
environment is frozen.
@DemiMarie
Copy link
Author

Added ~200 new test to the test runner.

@lukego
Copy link

lukego commented Mar 14, 2017

Regression?

$ git log --oneline -1
fda2015 Add more tests to the test suite

$ ../../luajit/src/luajit test.lua
../../luajit/src/luajit: test.lua:10: module 'ctest' not found:
        no field package.preload['ctest']
        no file './ctest.lua'
        no file '/usr/local/share/luajit-2.1.0-beta2/ctest.lua'
        no file '/usr/local/share/lua/5.1/ctest.lua'
        no file '/usr/local/share/lua/5.1/ctest/init.lua'
        no file './ctest.so'
        no file '/usr/local/lib/lua/5.1/ctest.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        test.lua:10: in main chunk
        [C]: at 0x00404a70

lukego added a commit to lukego/LuaJIT-test-cleanup that referenced this pull request Mar 14, 2017
I have cherry-picked this change from commit
52015c1 of @DemiMarie's `fixed-goto`
branch published at LuaJIT#13.

I hope it is right! :-)
@sindrom91
Copy link

I don't think this is a regression. These commits add ffi tests to the runner, so you need to compile libraries from test/src. Also, make sure that your libraries are in a place where they can be found (you might need to export appropriate LUA_CPATH).

@lukego
Copy link

lukego commented Mar 14, 2017

To me it looks like a regression because prior to these changes the instructions in test/README.md worked for me but now they do not. Excerpt:

## Running the test suite ##

To run the default test suite, run `test.lua` using the Lua interpreter you
wish to test, for example:

    $ ~/luajit-2.0/src/luajit test.lua

@sindrom91
Copy link

Oh, I see what you're saying. I didn't look at it that way. :)

@DemiMarie
Copy link
Author

There are some tests still failing. I believe that they indicate genuine bugs in either LuaJIT or the test suite.

I fixed the instructions in README.md.

This adds many FFI tests.  It also fixes tests for the contents
of the string and math libraries.
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.

3 participants