1. Problems running eui in a docker image
- Posted by axtens_bruce in February
- 582 views
So git clone from https://github.com/exercism/euphoria-test-runner
Then run in the euphoria-test-runner folder
sudo bin/run-in-docker.sh all-fail tests/all-fail/ tests/all-fail/
What I get is
interpreting /solution/t_all-fail.e: CMD 'eui -d UNITTEST -batch /solution/t_all-fail.e ' FAILURE: /solution/t_all-fail.e program died with status 1 Test results summary: FAIL: /solution/t_all-fail.e Files (run: 1) (failed: 1) (0% success)(you won't get exactly that because I added -verbose to the command line for eutest). I any case the above suggests that some subsystem is failing.
If I put a puts in early, the output from the system call appears and THEN the puts output appears. It's as if the redirection isn't working.
If I change line 81 in bin/run.ex to use eui instead of eutest it still doesn't work.
SOME TIME LATER
So I changed > to 2> and changed from eutest to eui. Now it appears to work properly. Why oh why?
-Bruce
2. Re: Problems running eui in a docker image
- Posted by ghaberek (admin) in March
- 542 views
So I changed > to 2> and changed from eutest to eui. Now it appears to work properly. Why oh why?
It looks like everything in std/unittest.e is reporting on STDERR, but eutest itself writes to STDOUT. Not sure if that's by mistake or design.
Best solution is probably to redirect STDERR to STDOUT and capture everything from STDOUT (which now includes STDERR) to your output file.
So change line 81 back to what you had and then add "2>&1" to the command line string. I'd also pull the input file out to a variable for good measure.
If I'm understanding the process correctly, everything is working for me with this code and bin/run-tests-in-docker.sh is completing successfully (I think).
sequence infile = join_path({solution_dir,"t_" & slug & ".e"}) sequence outfile = join_path({output_dir,"t_" & slug & ".out"}) sequence cmd = build_commandline({"eutest",infile,">",outfile,"2>&1"}) system(cmd,2)
-Greg
3. Re: Problems running eui in a docker image
- Posted by axtens_bruce in March
- 522 views
Thanks, Greg!
So what's the difference between eui and eutest in this situation? I'm getting good results just with eui.
-Bruce
4. Re: Problems running eui in a docker image
- Posted by ghaberek (admin) in March
- 519 views
So what's the difference between eui and eutest in this situation? I'm getting good results just with eui.
Eutest is the unit testing tool. It will run all of your tests and aggregate the results.
Running a single unit test file with eui performs only the tests in that file.
-Greg