opensubmit
opensubmit copied to clipboard
Deal with color output from GCC
Some GCC version produce coloured output on errors. This currently messes up the rendering in the frontend with funny characters.
Switching it of by default (see https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Language-Independent-Options.html) only works if the compiler is modern enough.
The options seem to be:
- Detect the GCC version on executor configuration and set the compiler call defaults accordingly.
- Allow adding compiler options in executor.cfg and let the admins deal with it.
- Allow adding compiler options in the Job interface and let the tutors deal with it.
- Parse color ASCII code in output and render it properly in the frontend.
@tzwenn @thehappyhippo @werner-matthias
Any opinions ?
Add an option for environment variables in the executor.cfg to handle GCC colors (GCC_COLORS) and other stuff. The validator has to handle with output etc. Submission result output format should be specified in sent result (text/html/markdown etc.) to enable rendering in the web ui. The validator could set a environment variable for rendering format for the executor, or add a tag in the first line of output?
@werner-matthias votes for rendering them in the "opensubmit-exec test" and web page outputs.
Easy idea. Just pipe the output.