troeger / opensubmit

Just another submission system for course assignment solutions. Supports semi-automated code evaluation.
GNU Affero General Public License v3.0
30 stars 18 forks source link

Deal with color output from GCC #192

Open troeger opened 6 years ago

troeger commented 6 years ago

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:

troeger commented 6 years ago

@tzwenn @thehappyhippo @werner-matthias

Any opinions ?

thehappyhippo commented 6 years ago

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?

troeger commented 6 years ago

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

cforler commented 6 years ago

Easy idea. Just pipe the output.