From eff65db9aa6f4e41731397f990193a6b619badea Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sun, 18 Dec 2022 22:55:14 +0100 Subject: run test on makefile not on script --- AoC2022/01/solver.lisp | 2 +- AoC2022/02/solver.lisp | 2 +- AoC2022/03/solver.lisp | 2 +- AoC2022/04/solver.lisp | 2 +- AoC2022/05/solver.lisp | 2 +- AoC2022/06/solver.lisp | 2 +- AoC2022/07/solver.lisp | 2 +- AoC2022/08/solver.lisp | 2 +- AoC2022/10/solver.lisp | 2 +- AoC2022/12/solver.lisp | 2 +- AoC2022/13/solver.lisp | 2 +- AoC2022/14/solver.lisp | 2 +- AoC2022/15/solver.lisp | 2 +- AoC2022/16/solver.lisp | 1 - AoC2022/makefile | 2 +- 15 files changed, 14 insertions(+), 15 deletions(-) (limited to 'AoC2022') diff --git a/AoC2022/01/solver.lisp b/AoC2022/01/solver.lisp index ee84450..d39bb7c 100755 --- a/AoC2022/01/solver.lisp +++ b/AoC2022/01/solver.lisp @@ -20,4 +20,4 @@ ;; calculate the maximum from each elves rations (fiveam:is (= 213159 (apply #'+ (subseq (sort rations #'>) 0 3)))))) -(fiveam:run-all-tests) + diff --git a/AoC2022/02/solver.lisp b/AoC2022/02/solver.lisp index 58abd1b..52f611b 100644 --- a/AoC2022/02/solver.lisp +++ b/AoC2022/02/solver.lisp @@ -53,4 +53,4 @@ (fiveam:is (= 15457 (solver #'reactive-plays)))) -(fiveam:run-all-tests) + diff --git a/AoC2022/03/solver.lisp b/AoC2022/03/solver.lisp index a221495..bd421d0 100644 --- a/AoC2022/03/solver.lisp +++ b/AoC2022/03/solver.lisp @@ -52,4 +52,4 @@ (fiveam:is (= 2567 (badge)))) -(fiveam:run-all-tests) + diff --git a/AoC2022/04/solver.lisp b/AoC2022/04/solver.lisp index bcf37d7..cb678fb 100644 --- a/AoC2022/04/solver.lisp +++ b/AoC2022/04/solver.lisp @@ -26,4 +26,4 @@ (fiveam:is (= 515 (count-according #'subcontained))) (fiveam:is (= 883 (count-according #'overlap)))) -(fiveam:run-all-tests) + diff --git a/AoC2022/05/solver.lisp b/AoC2022/05/solver.lisp index 037b7f3..809439b 100644 --- a/AoC2022/05/solver.lisp +++ b/AoC2022/05/solver.lisp @@ -44,4 +44,4 @@ (fiveam:is (equal "TPGVQPFDH" (solver #'single-move!))) (fiveam:is (equal "DMRDFRHHH" (solver #'bulk-move!)))) -(fiveam:run-all-tests) + diff --git a/AoC2022/06/solver.lisp b/AoC2022/06/solver.lisp index 36aab05..11759ff 100644 --- a/AoC2022/06/solver.lisp +++ b/AoC2022/06/solver.lisp @@ -14,4 +14,4 @@ (fiveam:is (= 1655 (solver 4))) (fiveam:is (= 2665 (solver 14)))) -(fiveam:run-all-tests) + diff --git a/AoC2022/07/solver.lisp b/AoC2022/07/solver.lisp index f0f5a93..a6c99ae 100644 --- a/AoC2022/07/solver.lisp +++ b/AoC2022/07/solver.lisp @@ -62,4 +62,4 @@ (fiveam:is (= 3636703 (dir-to-del (flat-dir-size) 70000000 30000000)))) -(fiveam:run-all-tests) + diff --git a/AoC2022/08/solver.lisp b/AoC2022/08/solver.lisp index f5a273f..2974648 100644 --- a/AoC2022/08/solver.lisp +++ b/AoC2022/08/solver.lisp @@ -47,4 +47,4 @@ The viewing distance is the lenght until a tree of equal height appears." (fiveam:is (= 8 (solver-p2 "eg-in"))) (fiveam:is (= 327180 (solver-p2 "input")))) -(fiveam:run-all-tests) + diff --git a/AoC2022/10/solver.lisp b/AoC2022/10/solver.lisp index a30aa56..550a7b2 100644 --- a/AoC2022/10/solver.lisp +++ b/AoC2022/10/solver.lisp @@ -48,4 +48,4 @@ #....#....#..#.#....#....#....#..#.#.... #....####..##..####.####.####.#..#.####.")))) -(fiveam:run-all-tests) + diff --git a/AoC2022/12/solver.lisp b/AoC2022/12/solver.lisp index 3297fd5..ce9a02a 100644 --- a/AoC2022/12/solver.lisp +++ b/AoC2022/12/solver.lisp @@ -58,4 +58,4 @@ (fiveam:is (= 29 (solver "eg-in" (lambda (x) (<= x 1))))) (fiveam:is (= 361 (solver "input" (lambda (x) (= x 0))))) (fiveam:is (= 354 (solver "input" (lambda (x) (<= x 1)))))) -(fiveam:run-all-tests) + diff --git a/AoC2022/13/solver.lisp b/AoC2022/13/solver.lisp index 62b8c2d..fe7fd70 100644 --- a/AoC2022/13/solver.lisp +++ b/AoC2022/13/solver.lisp @@ -39,4 +39,4 @@ (fiveam:is (= 140 (solver-2 "eg-in"))) (fiveam:is (= 27648 (solver-2 "input")))) -(fiveam:run-all-tests) + diff --git a/AoC2022/14/solver.lisp b/AoC2022/14/solver.lisp index 0a2af57..e0ed166 100644 --- a/AoC2022/14/solver.lisp +++ b/AoC2022/14/solver.lisp @@ -118,4 +118,4 @@ (let ((in-data (uiop:read-file-lines "./input"))) (fiveam:is (= 665 (solver in-data #'make-abyss-grid))) (fiveam:is (= 25434 (solver in-data #'make-finite-grid))))) -(fiveam:run-all-tests) + diff --git a/AoC2022/15/solver.lisp b/AoC2022/15/solver.lisp index a22efd4..fbe4ec3 100644 --- a/AoC2022/15/solver.lisp +++ b/AoC2022/15/solver.lisp @@ -112,7 +112,7 @@ (fiveam:is (= 56000011 (tune-soluton (fail-freq-edge (markers (uiop:read-file-lines "eg-in")) 0 20)))) (fiveam:is (= 11016575214126 (tune-soluton (fail-freq-edge (markers (uiop:read-file-lines "input")) 2700000 3300000))))) -(fiveam:run-all-tests) + ;; Obsolete drawing (defun grid (bounds) (destructuring-bind ((xmin xmax) (ymin ymax)) bounds diff --git a/AoC2022/16/solver.lisp b/AoC2022/16/solver.lisp index 0b3e309..78ed896 100644 --- a/AoC2022/16/solver.lisp +++ b/AoC2022/16/solver.lisp @@ -154,7 +154,6 @@ (fiveam:is (= 2474 (accumulated-flow (solver "input" 26 2))))) -(fiveam:run-all-tests) ;; (require :sb-sprof) ;; (sb-sprof:with-profiling (:max-samples 1000 diff --git a/AoC2022/makefile b/AoC2022/makefile index 968dbff..d30a711 100644 --- a/AoC2022/makefile +++ b/AoC2022/makefile @@ -12,7 +12,7 @@ emacs: ${PWD}/solver.el cd ${PWD} && emacs -batch -l ert -l solver.el -f ert-run-tests-batch-and-exit lisp: ${PWD}/solver.lisp - cd ${PWD} && sbcl --load ~/.sbclrc --script solver.lisp + cd ${PWD} && time sbcl --load ~/.sbclrc --load solver.lisp --eval '(fiveam:run-all-tests)' --non-interactive rust: ${PWD}/solver.rs cd ${PWD} && rustc solver.rs -o /tmp/solver && /tmp/solver -- cgit v1.2.3