Megatest

Update of "using trace with the megatest executable"
Login
Overview

Artifact ID: 3b3c99e60ff459d54ef059b96b034bc6e010b313
Page Name:using trace with the megatest executable
Date: 2014-11-26 15:24:29
Original User: matt
Parent: 478041416b70a5f37845f4aa8a4728088cd06f1a (diff)
Next dbcca1e5a6c9128fe9ceb580be1ef38cde4bb299
Content

Using trace to debug Megatest issues

NOTE: I have found this method to be very efficient for debugging in general and use it with Megatest and in most of my programs.

  1. Create ~/.megatestrc
    (use trace)
    (import trace)
    ;; list the functions you think might illuminate the problem here
    runs:process-expanded-tests
    )
  2. Patch trace to emit a little info on where the function was called
    chicken-install -r trace
    cd trace
    patch -p0 <<EOF
    *** trace.scm 2014-11-26 09:29:50.000000000 -0700
    --- ../../trace/trace.scm 2014-11-25 21:12:41.000000000 -0700
    ***************
    *** 61,66 ****
    --- 61,68 ----
          (trace-indent)
          (set! *trace-indent-level* (fx+ 1 *trace-indent-level*))
          (write (cons name args) port)
    +     (write ", Called from: " port)
    +     (write (conc (car (reverse (get-call-chain)))))
          (write-char #\newline port)
          (flush-output port) ) )
    EOF
    chicken-install
    
  3. Run your megatest runs and dig through the various logs :)