Phix test runner still broken

Test runner is still broken and I still have no idea why or how to fix it.
Highlightjs and codemirror plugin provided still not installed/tested.

What’s the issue with the test runner? Are the highlightjs and codemirror plugins published NPM packages?

An error occurs with the test runner, but I have no way of finding out what it is.
They are the first two results I get from googling “npm phix”.

CC @iHiD

As for the test runner, where is this error being reported? The online editor? A GHA isn’t working?

(Weird looking first link, but it seems to open the right thing)

The test runner does not report coding/syntax errors properly, and warbles on about infrastructure or something, which most users will not find helpful.

“It works on my PC”: I’m obviously somehow returning the wrong thing, but I don’t know what precisely is being objected to, on the exercism site.

Does it time out on all solutions? The test runner only gets 20 seconds to run the student code using the loaded Docker image for the test runner and then report it. That can be a problem for some tracks, especially if you need to compile student solutions.

Oh it’s certainly not that, it goes wrong in less than 3s. Is there something wrong with the results.json file it is creating? It kinda must be, I think.

[quote=“petelomax, post:5, topic:14984”]
“It works on my PC”: [/quote]

By this, do you mean that this works correctly?

To run the tests of a single solution using the Docker image, do the following:

1. Open a terminal in the project's root
2. Run `./bin/run-in-docker.sh <exercise-slug> <solution-dir> <output-dir>`

Once the test runner has finished, its results will be written to `<output-dir>/results.json`.

Sadly no, running docker locally here is apparently way beyond my skill set.

Running p run …\exercises\practice\clock gets me these results.json:

good run, sweet success:
clock: testing…{
“version”:1,
“status”:“pass”,
“message”:“”
}

syntax error, correctly reported:
clock: testing…{
“version”:1,
“status”:“error”,
“message”:“C:\Users\petel\AppData\Local\Temp\clock\clock.e:1
loYcal function normalise(integer m)
^ undefined identifier loYcal”
}

and one that goes wrong for reasons unknown:
clock: testing…{
“version”:1,
“status”:“fail”,
“message”:"failed: Subtract minutes - subtract minutes: “10:06” should equal “10:00"”
}

Oh - is it simply that I’ve got all my quotes in a muddle? [YES, IT WAS!]

The example solution at phix/exercises/practice/clock/.meta/example.e at main · exercism/phix · GitHub passes all the tests when submitted online. Is that the code you’re using here?

Yes: but it fails (and as above pretty sure I now finally know why) with
– return add_mins(clock,-minutes)
return add_mins(clock,minutes)

I think I just need
{
“version”:1,
“status”:“fail”,
“message”:“failed: Subtract minutes - subtract minutes: \“10:06\” should equal \“10:00\””
}

ie escape those embedded quotes, give me a mo…

Sorry. Are you saying the example solution is passing but shouldn’t be?

No. I meant “yes, that one”, but I have to edit in an error to get the bad-json problem.

I’ve now pushed an escape double quotes fix, and it worked!!

1 Like