2 * Functions and Variables for Bug Detection and Reporting::
5 @c -----------------------------------------------------------------------------
6 @node Functions and Variables for Bug Detection and Reporting
7 @section Functions and Variables for Bug Detection and Reporting
8 @c -----------------------------------------------------------------------------
10 @c -----------------------------------------------------------------------------
11 @anchor{run_testsuite}
12 @deffn {Function} run_testsuite ([@var{options}])
14 Run the Maxima test suite. Tests producing the desired answer are
15 considered ``passes,'' as are tests that do not produce the desired
16 answer, but are marked as known bugs.
18 @code{run_testsuite} takes the following optional keyword arguments
22 Display all tests. Normally, the tests are not displayed, unless the test
23 fails. (Defaults to @code{false}).
24 @item display_known_bugs
25 Displays tests that are marked as known bugs. (Default is @code{false}).
27 This is a single test or a list of tests that should be run. Each test can be specified by
28 either a string or a symbol. By default, all tests are run. The complete set
29 of tests is specified by @mrefdot{testsuite_files}
31 Display time information. If @code{true}, the time taken for each
32 test file is displayed. If @code{all}, the time for each individual
33 test is shown if @code{display_all} is @code{true}. The default is
34 @code{false}, so no timing information is shown.
36 Load additional tests for the @code{share} directory. If @code{true},
37 these additional tests are run as a part of the testsuite. If
38 @code{false}, no tests from the @code{share} directory are run. If
39 @code{only}, only the tests from the @code{share} directory are run.
40 Of course, the actual set of test that are run can be controlled by
41 the @code{tests} option. The default is @code{false}.
44 For example @code{run_testsuite(display_known_bugs = true, tests=[rtest5])}
45 runs just test @code{rtest5} and displays the test that are marked as
48 @code{run_testsuite(display_all = true, tests=["rtest1", rtest1a])} will
49 run tests @code{rtest1} and @code{rtest2}, and displays each test.
51 @code{run_testsuite} changes the Maxima environment.
52 Typically a test script executes @mref{kill} to establish a known environment
53 (namely one without user-defined functions and variables)
54 and then defines functions and variables appropriate to the test.
56 @code{run_testsuite} returns @code{done}.
58 @opencatbox{Categories:}
63 @c -----------------------------------------------------------------------------
64 @anchor{testsuite_files}
65 @defvr {Option variable} testsuite_files
67 @code{testsuite_files} is the set of tests to be run by
68 @mrefdot{run_testsuite} It is a list of names of the files containing
69 the tests to run. If some of the tests in a file are known to fail,
70 then instead of listing the name of the file, a list containing the
71 file name and the test numbers that fail is used.
73 For example, this is a part of the default set of tests:
76 ["rtest13s", ["rtest14", 57, 63]]
79 This specifies the testsuite consists of the files "rtest13s" and
80 "rtest14", but "rtest14" contains two tests that are known to fail: 57
83 @opencatbox{Categories:}
85 @category{Global variables}
89 @defvr {Option variable} share_testsuite_files
91 @code{share_testsuite_files} is the set of tests from the @code{share}
92 directory that is run as a part of the test suite by
93 @mrefdot{run_testsuite}.
95 @opencatbox{Categories:}
97 @category{Global variables}
101 @c -----------------------------------------------------------------------------
104 @deffn {Function} bug_report ()
106 Prints out Maxima and Lisp version numbers, and gives a link
107 to the Maxima project bug report web page.
108 The version information is the same as reported by @mrefdot{build_info}
110 When a bug is reported, it is helpful to copy the Maxima
111 and Lisp version information into the bug report.
113 @code{bug_report} returns an empty string @code{""}.
115 @opencatbox{Categories:}
120 @c -----------------------------------------------------------------------------
122 @deffn {Function} build_info ()
124 Returns a summary of the parameters of the Maxima build,
125 as a Maxima structure (defined by @code{defstruct}).
126 The fields of the structure are:
127 @code{version}, @code{timestamp}, @code{host}, @code{lisp_name}, and @code{lisp_version}.
128 When the pretty-printer is enabled (via @mref{display2d}),
129 the structure is displayed as a short table.
131 See also @mrefdot{bug_report}
137 @c x : build_info ()$
149 Maxima version: "5.36.1"
150 Maxima build date: "2015-06-02 11:26:48"
151 Host type: "x86_64-unknown-linux-gnu"
152 Lisp implementation type: "GNU Common Lisp (GCL)"
153 Lisp implementation version: "GCL 2.6.12"
155 (%i2) x : build_info ()$
162 (%o4) 2015-06-02 11:26:48
166 (%o5) x86_64-unknown-linux-gnu
170 (%o6) GNU Common Lisp (GCL)
173 (%i7) x@@lisp_version;
179 Maxima version: "5.36.1"
180 Maxima build date: "2015-06-02 11:26:48"
181 Host type: "x86_64-unknown-linux-gnu"
182 Lisp implementation type: "GNU Common Lisp (GCL)"
183 Lisp implementation version: "GCL 2.6.12"
187 The Maxima version string (here 5.36.1) can look very different:
192 Maxima version: "branch_5_37_base_331_g8322940_dirty"
193 Maxima build date: "2016-01-01 15:37:35"
194 Host type: "x86_64-unknown-linux-gnu"
195 Lisp implementation type: "CLISP"
196 Lisp implementation version: "2.49 (2010-07-07) (built 3605577779) (memory 3660647857)"
199 @c The version number comes from "git describe", and is (in that example)
200 @c 331 commits after the latest tag, that is reachable from that commit
201 @c don't know how to describe it better...
202 In that case, Maxima was not build from a released sourcecode,
203 but directly from the GIT-checkout of the sourcecode.
204 In the example, the checkout is 331 commits after the latest GIT tag
205 (usually a Maxima (major) release (5.37 in our example)) and the
206 abbreviated commit hash of the last commit was "8322940".
208 Front-ends for maxima can add information about currently being used
209 by setting the variables @code{maxima_frontend} and
210 @code{maxima_frontend_version} accordingly.
212 @opencatbox{Categories:}