opensubmit icon indicating copy to clipboard operation
opensubmit copied to clipboard

Deal with color output from GCC

Open troeger opened this issue 7 years ago • 4 comments

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.

troeger avatar Nov 30 '17 19:11 troeger

@tzwenn @thehappyhippo @werner-matthias

Any opinions ?

troeger avatar Dec 18 '17 10:12 troeger

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?

thehappyhippo avatar Dec 21 '17 13:12 thehappyhippo

@werner-matthias votes for rendering them in the "opensubmit-exec test" and web page outputs.

troeger avatar Jan 10 '18 12:01 troeger

Easy idea. Just pipe the output.

cforler avatar Oct 11 '18 13:10 cforler