eisl icon indicating copy to clipboard operation
eisl copied to clipboard

Could you please explain in README how to run tests?

Open yurivict opened this issue 2 years ago • 15 comments

The Installation section should include this information.

yurivict avatar Jul 26 '22 06:07 yurivict

Please make according to the type of OS. If it works, it's OK. The operation check is in the verify folder.

sasagawa888 avatar Jul 26 '22 07:07 sasagawa888

The make check command prints a lot of messages and some errors and warnings: test-eisl-2.50-114-g1216d9e.txt

yurivict avatar Jul 26 '22 07:07 yurivict

Don't worry about the warning. You will be in trouble if you get an error. I don't know about FBSD. Mr. Poldy may know. see https://github.com/sasagawa888/eisl/blob/master/documents/POLICY.md

sasagawa888 avatar Jul 26 '22 08:07 sasagawa888

There are errors. Am I in trouble?

yurivict avatar Jul 26 '22 08:07 yurivict

Easy-ISLisp has not been confirmed to work on FreeBSD. I would be grateful if you could improve and send me a pull request.

sasagawa888 avatar Jul 26 '22 08:07 sasagawa888

Note that "make check" doesn't run the test suite. It runs cppcheck, a static analyzer, over the source code which although useful is something different. So errors from this may be false positives because cppcheck isn't a full compiler and may not know that some code is dead.

In the past, I have run the benchmark suite as a simple sanity test. Instructions are in documentation/BENCH.md. Feel free to log tickets for any issues you find, my personal workflow for debugging C is at the end of documentation/DEBUG.md.

A port to FreeBSD is likely to be very similar to OpenBSD, which I run sometimes. If you run "grep -ri openbsd ." you'll see where to start anyway.

poldy avatar Jul 26 '22 17:07 poldy

FreeBSD patch: https://github.com/sasagawa888/eisl/pull/182

yurivict avatar Jul 26 '22 19:07 yurivict

Tests fail:

cd /disk-samsung/freebsd-ports/lang/eisl/work/eisl-2.50-114-g1216d9e && /disk-samsung/freebsd-ports/lang/eisl/work/stage/usr/local/bin/eisl -s bench/runbench.lsp

around here line=1 column=0
Illegal argument at LOAD "bench/fib20.o"
debug mode ?(help)
>>

yurivict avatar Jul 26 '22 19:07 yurivict

Tests fail:

cd /disk-samsung/freebsd-ports/lang/eisl/work/eisl-2.50-114-g1216d9e && /disk-samsung/freebsd-ports/lang/eisl/work/stage/usr/local/bin/eisl -s bench/runbench.lsp

around here line=1 column=0
Illegal argument at LOAD "bench/fib20.o"
debug mode ?(help)
>>

I had to double-check, but I think I can explain this. I get the same error if I just run (load "bench/runbench.lsp") at the REPL in a clean checkout. It should maybe be highlighted more, but you first need to run eisl -c (to load the compiler feature), then (load "bench/cpbench.lsp") to compile all the benchmarks first. There is a comment to this effect in bench/runbench.lsp, and a perhaps cryptic command to "please compile with cpbench.lsp" in documentation/BENCH.md, but obviously these are easily missed. Feel free to highlight as you feel appropriate in the pull request.

poldy avatar Jul 26 '22 20:07 poldy

Thank you for your pull request. However, there is a conflict. I can't solve it. Please make a pull request again.

sasagawa888 avatar Jul 26 '22 22:07 sasagawa888

Maybe you could add a shell script to run benchmarks because it isn't obvious at all.

I tried this and failed:

        cd ${TEST_WRKSRC} && \
                ${STAGEDIR}${PREFIX}/bin/eisl -c && \
                ${STAGEDIR}${PREFIX}/bin/eisl -s bench/cpbench.lsp && \
                ${STAGEDIR}${PREFIX}/bin/eisl -s bench/runbench.lsp
Can't open a file at LOAD "/home/yuri/eisl/library/compiler.lsp"
debug mode ?(help)

yurivict avatar Jul 26 '22 22:07 yurivict

Try the following:

eisl -c
> (load "bench/cpbench.lsp")

eisl -s bench/runbench.lsp

sasagawa888 avatar Jul 26 '22 23:07 sasagawa888

It fails:

$ ./eisl -c
Can't open a file at LOAD "/home/yuri/eisl/library/compiler.lsp"
debug mode ?(help)
>>

yurivict avatar Jul 26 '22 23:07 yurivict

You need to either move your clone to $HOME/eisl or set an EASY_ISLISP variable in your environment to point to where it is, see the end of the "Installation" section of the README.

poldy avatar Jul 27 '22 00:07 poldy

I modified the compiler for freeBSD. I added compiler options for freeBSD. It is the 241st line in compiler.lsp. Please correct the options.

sasagawa888 avatar Jul 27 '22 07:07 sasagawa888