diff options
author | Douglas Katzman <dougk@google.com> | 2022-06-15 16:23:12 -0400 |
---|---|---|
committer | Douglas Katzman <dougk@google.com> | 2022-06-15 16:23:12 -0400 |
commit | bcdd8bac895e82203be9998e70fb355de7368daa (patch) | |
tree | a87e32bf132edaba21fd88dd4e0b76d77f8d92f9 /tests/parallel-exec.sh | |
parent | f5d69e6adc204189c824881e60f6671451e22007 (diff) |
Keep only failing logs for "--runs_per_test huge-num"
so that if you're trying to hammer on a particular test, you can more easily
examine only the failures. "huge-num" is defined arbitrarily as >= 100.
Diffstat (limited to 'tests/parallel-exec.sh')
-rwxr-xr-x | tests/parallel-exec.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/parallel-exec.sh b/tests/parallel-exec.sh index 9ed971a15..6aae708e9 100755 --- a/tests/parallel-exec.sh +++ b/tests/parallel-exec.sh @@ -45,6 +45,7 @@ TEST_DIRECTORY=$junkdir SBCL_HOME=../obj/sbcl-home exec ../src/runtime/sbcl \ "gethash-concurrency.impure" "arith-slow.pure")) (defvar *filter* nil) +(defglobal *delete-logs* nil) (defun choose-order (tests) (when *filter* (let (strings) @@ -154,12 +155,12 @@ TEST_DIRECTORY=$junkdir SBCL_HOME=../obj/sbcl-home exec ../src/runtime/sbcl \ (wait)) (let ((pid (sb-posix:fork))) (when (zerop pid) + (let ((mylog (format nil "$logdir/~a~@[-~d~]" (car file) (cdr file)))) #+(and linux sb-thread 64-bit) (sb-alien:alien-funcall (sb-alien:extern-alien "reset_gc_stats" (function sb-alien:void))) ;; FILE is (filename . test-iteration) - (with-open-file (stream (format nil "$logdir/~a~@[-~d~]" (car file) (cdr file)) - :direction :output :if-exists :supersede) + (with-open-file (stream mylog :direction :output :if-exists :supersede) (alien-funcall (extern-alien "dup2" (function int int int)) (sb-sys:fd-stream-fd stream) 1) (alien-funcall (extern-alien "dup2" (function int int int)) 1 2)) @@ -202,7 +203,8 @@ TEST_DIRECTORY=$junkdir SBCL_HOME=../obj/sbcl-home exec ../src/runtime/sbcl \ (funcall (intern "PRINT-ALLOCATOR-HISTOGRAM" "SB-THREAD"))) (sb-sprof:report :type :flat) (gc :gen 7) - (exit :code (if (unexpected-failures) 1 104))))) + (when (and (not (unexpected-failures)) *delete-logs*) (delete-file mylog)) + (exit :code (if (unexpected-failures) 1 104)))))) (format t "~A: pid ~d~@[ (trial ~d)~]~%" (car file) pid (cdr file)) (incf subprocess-count) (push (list pid file (get-internal-real-time)) subprocess-list))) @@ -261,6 +263,9 @@ TEST_DIRECTORY=$junkdir SBCL_HOME=../obj/sbcl-home exec ../src/runtime/sbcl \ argv (cddr argv))) (t (return)))) + (when (>= runs-per-test 10) + (format t "~&Note: will not keep logs of passing runs~%") + (setq *delete-logs* t)) (setq argv (mapcar (lambda (file) (probe-file file) ; for effect |