CTD File Testing

Jaap Eldering jaap at jaapeldering.nl
Tue Oct 24 23:31:03 CEST 2017


On 24/10/17 23:00, Bryce Sandlund wrote:
> Hi,

Hi Bryce,

> I am preparing a problem set for Kattis and thought I'd try making a CTD file input format validator. I found the CTD GitHub and have been following along with the README and language specification. I'm currently a little frustrated. By running Kattis problemtools, I can determine if my ctd file compiles and accepts test cases. Currently, I cannot get
> 
> SPACE EOF
> 
> to accept a file with a single space, or
> 
> INT(1,10000) EOF
> 
> to accept a file with a single integer. I can get EOF to accept an empty file.
> 
> 
> Clearly something silly is going on, and it'd be much easier to see by a more instructive error message than accepting or not-accepting. So I thought I'd try to compile the ctd file my self, or run it myself and see if there is more error output. It looks like there's no instructions on how to go about doing that in the README on GitHub. I'm also not sure if the error messages would be more informative.

I'm sorry to hear you had a frustrating experience.

To understand what's going on, when you say "So I thought I'd try to compile the ctd file my self" do you mean that up to now it was built and run as part of problemtools? And just to confirm: with "ctd" are you referring to the checktestdata program?

> I am suggesting such instructions be added to the README and that such a command would be able to give me a more informative error.

Normally, checktestdata should print a message indicating which command in the script failed to match at which position in the input file. What output does it generate in your case? And what's the exit code?

When you're using using checktestdata directly from the repository at https://github.com/DOMjudge/checktestdata, the easiest is to check out the "release" and run "./bootstrap" and "make build" as mentioned in README.md. Does that compile it successfully? Is there anything unclear or missing according to you?

Secondly, you can run "make check" to verify the compiled checktestdata program against a set of tests. These tests are not completely deterministic and may fail sometimes. That's ok, but they should succeed at least 80-90% of the time.

If anything of this fails, can you tell us what Linux distribution and version you are using and what version of checktestdata you are running (I'd assume the latest from either master or release branch)?

Finally, checktestdata has the option -d to generate debugging output.

If you find that that doesn't help you, please send us the checktestdata script and the input file you are running it on.

Best,
Jaap

P.S. Could you register to the mailinglist, so that your emails arrive automatically?



More information about the DOMjudge-devel mailing list