Skip to content

Commit 02293bc

Browse files
package structure
1 parent 29c77ab commit 02293bc

File tree

7 files changed

+15
-933
lines changed

7 files changed

+15
-933
lines changed

backend/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module code-grader/backend
1+
module github.com/markhuang1212/code-grader/backend
22

33
go 1.16
44

go.mod

Lines changed: 0 additions & 11 deletions
This file was deleted.

go.sum

Lines changed: 0 additions & 916 deletions
This file was deleted.

runtime-compile/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ FROM ubuntu:21.04
22

33
RUN apt-get update
44
RUN apt-get -y upgrade
5-
RUN apt-get -y install golang
5+
RUN apt-get -y install golang ca-certificates build-essential
6+
7+
RUN update-ca-certificates
68

79
WORKDIR /code-grader
8-
COPY ../ .
10+
COPY . .
911

1012
WORKDIR /code-grader/runtime-compile
1113
RUN go build
12-
13-
ENTRYPOINT [ "./code-grader-runtime-compile" ]
14+
ENTRYPOINT [ "./runtime-compile" ]

runtime-compile/go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module github.com/markhuang1212/code-grader/runtime-compile
2+
3+
go 1.16
4+
5+
replace github.com/markhuang1212/code-grader/types => ../types
6+
7+
require github.com/markhuang1212/code-grader/types v0.0.0-00010101000000-000000000000 // indirect

runtime-compile/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func main() {
2828
var testCaseOptions types.TestCaseOptions
2929
json.Unmarshal(testCaseJson, &testCaseOptions)
3030

31-
args := append(testCaseOptions.CompilerOptions.Flags, "-x", "c++", "-")
31+
args := append(testCaseOptions.CompilerOptions.Flags, "-o-", "-x", "c++", "-")
3232
compileCmd := exec.Command("g++", args...)
3333

3434
compileCmdStdin, err := compileCmd.StdinPipe()

types/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module github.com/markhuang1212/code-grader/types

0 commit comments

Comments
 (0)