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

Tests fail #1

Open
erickmelo opened this issue Apr 9, 2012 · 6 comments
Open

Tests fail #1

erickmelo opened this issue Apr 9, 2012 · 6 comments

Comments

@erickmelo
Copy link

Hi,

I'm trying to compile the code and run the tests, but I'm having problems with this.

  • Tests are taking so long to run (5+ minutes)
  • Tests that are supposed to pass are failing (all of them)

Some idea about what is happening?

My configuration:
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
Mac OSX 10.6.8
Node v0.6.15

@humbletim
Copy link
Owner

thanks for the feedback.

just now on Ubuntu 11.04:
node v0.2.6 takes ~5s and results in "49/49 TESTS PASSED"
node v0.6.6 takes ~3s and results in "49/49 TESTS PASSED"

so next chance i get i'll try with node v0.6.15 and OSX

from the top ljs folder you could try running these commands to see where the issue might be:

# all but luac invocation should display 'Une Deux Trois!' test output $ lua tests/pass/hello.lua $ luac tests/pass/hello.lua $ lua luac.out $ node tests/runljs.js

@erickmelo
Copy link
Author

In fact the problem can be related to the node version... All lua and luac commands work fine.. The problem is when I run tests/runljs.js

I will try to install the suggested versions of node to check if is this the problem... I post here the results..

Thanks!

@erickmelo
Copy link
Author

I tried with an older version of node (v0.6.6) and I've the same problem...

Can it be related to the luac generated bytecodes that are not compatible with ljs?

(Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio)

--- running tests/pass/.lua through lua ---
lua tests/pass/
.lua ran OK
bash tests/run.sh

LVMJS=node tests/runljs.js

tests/pass/*.lua
[FAILED] tests/pass/add.lua

@bananu7
Copy link

bananu7 commented Nov 20, 2012

Hi!
Just ran node from binaries on newest Fedora, a lot of tests fail. Any thoughts? I can of course give more info if needed; I might be interested in further development of this project.

@humbletim
Copy link
Owner

hi,

are you by chance on a 64bit os? if so, the issue could be due to endian mismatch between bytecode produced by your local luac and what LJS expects (currently the format produced by x86/32-bit luac from Lua 5.1).

and by lots, do you mean all? in the endian scenario i've only seen things fail as a whole group, so if you are getting mixed results then could be a different issue.

if you could try the sequence of commands in my earlier comment (which are the steps the test runner automates) then the output produced should help narrow things down.

if interested in hacking on the bytecode loader let me know and i'll try to generate some notes for a starting point; i've also been experimenting with adapting the loader/VM to support Lua 5.2 formats

@humbletim
Copy link
Owner

just checked-in support for lua5.1 bytecode produced by x86_64 luac. i was able to replicate the issues reported -- should now be fixed.

looking to get confirmation from OS X users (that "make test" now runs / passes as expected). thanks, -t

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

No branches or pull requests

3 participants