autolab / Tango

Standalone RESTful autograding service
http://www.autolabproject.com/
Apache License 2.0
47 stars 60 forks source link

Remove interactive flag from exec #226

Closed victorhuangwq closed 2 years ago

victorhuangwq commented 2 years ago

Fixes the issue where getPartialOutput does not work in Autolab Docker.

Achieves it by removing the -it interactive flag that is meant for an interactive command, which throws an error when run in python in Docker.

How to test Spin up Autolab Docker, do an autograding of hello.c with this content

/* Solution for the Hello Lab */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main()
{
    for (int i = 0; i < 5; i++)
    {
        /* code */

        printf("Hello, world\n");
        sleep(10);
        fflush(stdout);
    }
    return 0; /* important to return zero here */
}

Partial output should work (as long as the error of not appearing on the queue does not come up). Without this PR, it will always not work.