From f38f706b72b12fbc1e14b6395511e32538510dbc Mon Sep 17 00:00:00 2001
From: Robert Grancsa <robert.grancsa2002@gmail.com>
Date: Fri, 21 Mar 2025 15:33:49 +0200
Subject: [PATCH] Added docker config

Signed-off-by: Robert Grancsa <robert.grancsa2002@gmail.com>
---
 .gitignore         |   3 +-
 Dockerfile         |  15 +--
 checker/checker.sh |   2 -
 checker/cs/cs.sh   |   0
 data.json          | 230 +++++++++++++++++++++++++++++++++++++++++----
 src/Makefile       |   2 +-
 6 files changed, 215 insertions(+), 37 deletions(-)
 mode change 100644 => 100755 checker/checker.sh
 mode change 100644 => 100755 checker/cs/cs.sh

diff --git a/.gitignore b/.gitignore
index 831faf1..ddae07f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 transpiler
-*.o
\ No newline at end of file
+*.o
+*.out
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 2942499..4b85f12 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,17 +1,6 @@
-FROM ghcr.io/open-education-hub/vmcheker-next-base-image/base-container:latest
-
-ENV DEBIAN_FRONTEND noninteractive
-
-RUN apt-get update
-
-RUN apt-get install -yqq gcc-multilib gdb curl && \
-    apt-get install -y build-essential valgrind
-
-RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
-
-ENV PATH="/root/.cargo/bin:${PATH}"
+FROM gitlab.cs.pub.ro:5050/iocla/tema-1-2024
 
 RUN cargo install hw_checker
 
-
 COPY ./checker ${CHECKER_DATA_DIRECTORY}
+COPY ./data.json ${CHECKER_DATA_DIRECTORY}
diff --git a/checker/checker.sh b/checker/checker.sh
old mode 100644
new mode 100755
index 0092d31..b98f49d
--- a/checker/checker.sh
+++ b/checker/checker.sh
@@ -6,9 +6,7 @@ test_all()
     make clean
     ulimit -n 1024
     cd ..
-    echo '<VMCK_NEXT_BEGIN>'
     hw_checker --legacy
-    echo '<VMCK_NEXT_END>'
 }
 
 test_all
diff --git a/checker/cs/cs.sh b/checker/cs/cs.sh
old mode 100644
new mode 100755
diff --git a/data.json b/data.json
index fa1c591..0f58a0d 100644
--- a/data.json
+++ b/data.json
@@ -1,21 +1,211 @@
 {
-    "tests": [
-      [
-        {
-          "id": 0,
-          "name": "MOV",
-          "status": "0",
-          "log": "",
-          "time_normal": 0.0,
-          "time_valgrind": 0.0,
-          "timeout": 30000,
-          "test_score": 5
-        }
-      ]
-    ],
-    "test_path": "checker/",
-    "exec_name": [
-      "transpiler"
-    ],
-    "valgrind_enabled": false
-  }
\ No newline at end of file
+  "tests": [
+    [
+      {
+        "id": 0,
+        "name": "MOV 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 1,
+        "name": "MOV 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 2,
+        "name": "LOGICAL 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 3,
+        "name": "LOGICAL 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 4,
+        "name": "ADD 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 5,
+        "name": "ADD 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 6,
+        "name": "SUB 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 7,
+        "name": "SUB 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 8,
+        "name": "MUL 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 9,
+        "name": "MUL 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 10,
+        "name": "DIV 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 11,
+        "name": "DIV 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 12,
+        "name": "SHIFT 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 13,
+        "name": "SHIFT 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 14,
+        "name": "FOR 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 15,
+        "name": "FOR 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 16,
+        "name": "WHILE 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 17,
+        "name": "WHILE 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 18,
+        "name": "COMPLEX 1",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      },
+      {
+        "id": 19,
+        "name": "COMPLEX 2",
+        "status": "0",
+        "log": "",
+        "time_normal": 0.0,
+        "time_valgrind": 0.0,
+        "timeout": 30000,
+        "test_score": 5
+      }
+    ]
+  ],
+  "test_path": "checker/",
+  "exec_name": [
+    "transpiler"
+  ],
+  "valgrind_enabled": false
+}
\ No newline at end of file
diff --git a/src/Makefile b/src/Makefile
index 22e35f5..0622917 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,7 +6,7 @@ TARGET = transpiler
 
 all: $(TARGET)
 
-$(TARGET): main.o parser.o
+$(TARGET): main.o
 	$(CC) $(CFLAGS) -o ../$@ $^
 
 %.o: %.c
-- 
GitLab