h48

A prototype for an optimal Rubik's cube solver, work in progress.
git clone https://git.tronto.net/h48
Download | Log | Files | Refs | README | LICENSE

commit 3d54256257bef55e398f26ab1f0f7aa21901eddd
parent ffb67c9dcd22c4c3258b9ef78301e404e7d9a796
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Thu,  5 Oct 2023 15:40:38 +0200

Avoid multiple compilation when running tests

Diffstat:
M.gitignore | 1+
Mtest/test.sh | 7+++++--
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,3 +1,4 @@ test/*/runtest test/run test/last.* +test/*.o diff --git a/test/test.sh b/test/test.sh @@ -9,10 +9,13 @@ SRC="src/cube_array.c" TESTBIN="test/run" TESTOUT="test/last.out" TESTERR="test/last.err" +CUBEOBJ="test/cube.o" + +$CC -c $SRC -o $CUBEOBJ for t in test/*; do if [ ! -d $t ]; then continue; fi - $CC -o $TESTBIN $t/*.c $SRC || exit 1; + $CC -o $TESTBIN $t/*.c $CUBEOBJ || exit 1; for cin in $t/*.in; do c=$(echo "$cin" | sed 's/\.in//') cout=$c.out @@ -29,4 +32,4 @@ for t in test/*; do done echo "All tests passed!" -rm -rf $TESTBIN $TESTOUT $TESTERR +rm -rf $TESTBIN $TESTOUT $TESTERR $CUBEOBJ