1. Grinding to a halt

So this folder holds the next challenge to the Euphoria track on Exercism. I have to come up with Euphoria equivalents and my work-life is getting extremely busy right now due to considerable interest in a previous project being shown by UNESCO. So, please, can someone come alongside me here and help out?

-Bruce

new topic     » topic index » view message » categorize

2. Re: Grinding to a halt

Is that the right link? All I get is five directories (which brings the classic four candles sketch to mind).
If it is, then maybe you just need to figure out what other languages are doing and replicate that?

Should it not look alot more like https://github.com/exercism/generic-test-runner ?

You might also want to complain about "You can find more information in the [docker.md](/docs/building/tooling/test-runners/docker) file."

new topic     » goto parent     » topic index » view message » categorize

3. Re: Grinding to a halt

petelomax said...

Is that the right link? All I get is five directories (which brings the classic four candles sketch to mind).
If it is, then maybe you just need to figure out what other languages are doing and replicate that?

Should it not look alot more like https://github.com/exercism/generic-test-runner ?

It occurred to me that I didn't actually give much info about what I needed help with. Okay will do that.

petelomax said...

You might also want to complain about "You can find more information in the [docker.md](/docs/building/tooling/test-runners/docker) file."

That has also occurred to me. I shall do that too.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Grinding to a halt

So along with the track code there's also a separate repo for the test runner. Part of the process of getting the former going is the test runner which I've represented in my own fork as

include std/filesys.e 
include std/cmdline.e 
include std/io.e 
include std/sequence.e 
include std/search.e 
 
procedure process(sequence slug, sequence soln_folder, sequence outp_folder) 
    sequence solution_dir=canonical_path(soln_folder) 
    sequence output_dir=canonical_path(outp_folder) 
    sequence results_file=join_path({output_dir, "/results.json"}) 
 
    create_directory(output_dir) 
    printf(1, "%s: testing...", {slug}) 
    sequence cmd = build_commandline({"cp",join_path({solution_dir, ".meta", "example.ex"}),join_path({"/tmp",slug & ".ex"})}) 
    system(cmd,2) 
    cmd = build_commandline({"cp", join_path({solution_dir,"t_" & slug & ".e"}),"/tmp"}) 
    system(cmd, 2) 
    sequence outfile = join_path({"/tmp","t_" & slug & ".out"}) 
    cmd = build_commandline({"eutest",join_path({"/tmp","t_" & slug & ".e"}),">", outfile}) 
    system(cmd,2) 
 
    atom fh = open(outfile, "r") 
    sequence data = read_lines(fh) 
    close(fh) 
 
    atom failure = 0 
    sequence failmsg = "" 
 
    for i = 1 to length(data) do 
        integer result = match("  failed:", data[i]) 
        if result then 
            failure = i  
            failmsg = slice(data[i],11) 
            break 
        end if 
    end for 
     
    fh = open(results_file,"w") 
    if failure = 0 then 
        write_file(fh, "{version: 1, status: \"pass\"}") 
    else 
        write_file(fh, sprintf("{version: 1, status: \"fail\", message: \"%s\"}", {find_replace("\"",failmsg,"\\\"")})) 
    end if 
    close(fh) 
    puts(1,"done\n") 
end procedure 
 
sequence cmdline = command_line() 
if (length(cmdline) < 5) then 
    puts(1, "usage: eui ./bin/run.ex exercise-slug path/to/solution/folder/ path/to/output/directory/\n") 
else 
    process(cmdline[3], cmdline[4], cmdline[5]) 
end if 

This will only ever run in Linux.

So (and here's where things get hazy for me) the with the tests folder is that it contains samples of what happens when a running Euphoria program hits certain problems in the running of eutest tests. Deliberately damaged instances of the code being test are created so as to be able to generate and capture what happens when

  • all tests fail
  • there's nothing to test (unsure about this)
  • there is a partial fail of tests
  • all tests pass
  • there's a syntax error in the code (in the code or the test?)

Somehow all this gets used by Exercism in their CI/CD.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Grinding to a halt

Exercism by Exercism 
wants to access your irvm account 
Personal user data 
Email addresses (read-only) 
 
This application will be able to read your private email addresses. 
Learn more 
No thanks.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Grinding to a halt

irv said...

Exercism by Exercism 
wants to access your irvm account 
Personal user data 
Email addresses (read-only) 
 
This application will be able to read your private email addresses. 
Learn more 
No thanks.

We've already been over this, https://openeuphoria.org/forum/137464.wc#137464

TLDR; Exercism can't do anything about this since it's a GitHub thing.

If someone really wants to participate without sharing their real email address, they can use a throwaway email to sign up for a throwaway GitHub account and then sign up for Exercism using the throwaway GitHub.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu