diff --git a/.gitignore b/.gitignore index 831faf18de5e4ba2ba149406416e458a616a268f..ddae07fca95d2909112de6c6324a7975d05cd6c3 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 2942499fd4d2a01f0e33b075e499920fac721b77..4b85f1232011bea7698cd3b6174e4e0c6bc93bb7 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 0092d315f651d7906b6f7832f9983ed477330a64..b98f49d4c44dabb9e91ca0328acb52e8d313629e --- 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 fa1c591e373c9254b2a79d11b62f961e277ab9b9..0f58a0de77ed44122126af29e83452d3147752f6 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 22e35f5fd1b2ddac37768d847c347adef25c6abf..0622917338e018a62fed85a536ee51710d171bba 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