From 75dbf46785ff05905484fd6afa5adf3796dd089b Mon Sep 17 00:00:00 2001
From: Gabriel Mocanu <viorel.mocanu@upb.ro>
Date: Sun, 10 Dec 2023 16:09:43 +0200
Subject: [PATCH] checker: Update checker

- Update `checker.sh`.
- Update `run_all.sh` to display `Total` points at the beginning of the
  line.

Signed-off-by: Gabriel Mocanu <viorel.mocanu@upb.ro>
---
 checker/checker.sh | 10 ++--------
 tests/run_all.sh   |  6 +++---
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/checker/checker.sh b/checker/checker.sh
index a8ff6a2..53052e2 100755
--- a/checker/checker.sh
+++ b/checker/checker.sh
@@ -5,13 +5,7 @@
 rm -fr ../tests/
 cp -r "$CHECKER_DATA_DIRECTORY"/../tests ..
 
-# Everything happens in the tests/ directory.
+# Checking and grading happens in the tests/ directory.
 pushd ../tests > /dev/null || exit 1
-
-echo -e "\n\n### RUNING CHECKER\n\n"
-make check
-
-echo -e "\n\n### RUNING LINTER\n\n"
-make lint
-
+./grade.sh
 popd > /dev/null || exit 1
diff --git a/tests/run_all.sh b/tests/run_all.sh
index f4746c3..609f9bd 100755
--- a/tests/run_all.sh
+++ b/tests/run_all.sh
@@ -7,7 +7,7 @@ script=./_test/run_test.sh
 
 exec_name="mini-shell"
 if test -z "$SRC_PATH"; then
-    SRC_PATH=$(pwd)/../src
+	SRC_PATH=$(pwd)/../src
 fi
 ln -fn "$SRC_PATH"/"$exec_name" .
 
@@ -18,7 +18,7 @@ bash "$script" init
 # bash "$script" check.
 
 for i in $(seq $first_test $last_test); do
-    bash "$script" "$i"
+	bash "$script" "$i"
 done | tee results.txt
 
 grep -a '\[.*\]$' results.txt | awk -F '[] /[]+' '
@@ -31,7 +31,7 @@ BEGIN {
 }
 
 END {
-    printf "\n%66s  %3d/100\n", "Total:", sum;
+    printf "\n%s %3d/100\n", "Total:", sum;
 }'
 
 # Cleanup testing environment.
-- 
GitLab