aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project_spec.md5
-rwxr-xr-xtest.sh10
2 files changed, 7 insertions, 8 deletions
diff --git a/project_spec.md b/project_spec.md
index e5e45c6..7935e9c 100644
--- a/project_spec.md
+++ b/project_spec.md
@@ -18,10 +18,9 @@ and professional deployment workflows.
- [ ] **Discuss exit codes**
- - [ ] **CI / GitLab Pipelines**
+ - [x] **Testing**
> [!NOTE]
- > Automatic build, test, benchmark, and packaging using `.gitlab-ci.yaml`
- > See [Getting Started Guide](https://gitlab-docs-d6a9bb.gitlab.io/ee/ci/) for **GitLab CI**.
+ > Using a shell script instead of **GitLab CI**
- [ ] **Benchmarking**
> [!NOTE]
diff --git a/test.sh b/test.sh
index 0a1f6b8..8cf9240 100755
--- a/test.sh
+++ b/test.sh
@@ -1,7 +1,6 @@
#!/bin/sh
-TEST_DIR="test"
-DATA_DIR="$TEST_DIR/data"
+DATA_DIR="data"
SRC_DIR="src"
SORTER="$SRC_DIR/sorter"
@@ -14,10 +13,11 @@ failed=0
for TEST_FILE in "$DATA_DIR"/*; do
((total++))
FILE_NAME=$(basename "$TEST_FILE")
- DIFF_FILE="$TEST_DIR/$FILE_NAME.diff"
+ DIFF_FILE="$FILE_NAME.diff"
- diff -u <($REF "$TEST_FILE") <($SORTER "$TEST_FILE") > "$DIFF_FILE"
+ echo "Testing $FILE_NAME ..."
+ diff -u <($REF "$TEST_FILE") <($SORTER "$TEST_FILE") > "$DIFF_FILE"
if [ ! -s "$DIFF_FILE" ]; then
echo "Passed: $TEST_FILE"
((passed++))
@@ -37,5 +37,5 @@ echo "Failed: $failed"
echo "=============================="
if [ $failed -ne 0 ]; then
- echo "Diff files for failed tests are saved in $TEST_DIR/"
+ echo "Diff files for failed tests are saved"
fi