ljs icon indicating copy to clipboard operation
ljs copied to clipboard

Tests fail

Open erickmelo opened this issue 13 years ago • 6 comments

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

erickmelo avatar Apr 09 '12 22:04 erickmelo

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

humbletim avatar Apr 10 '12 04:04 humbletim

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 avatar Apr 10 '12 11:04 erickmelo

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

erickmelo avatar Apr 10 '12 11:04 erickmelo

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.

bananu7 avatar Nov 20 '12 21:11 bananu7

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 avatar Nov 20 '12 21:11 humbletim

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

humbletim avatar Dec 15 '12 21:12 humbletim