Add mathjax for dgeqrf
[maxima.git] / tests / testpackages.sh
blob43f8386dd2794d9abf84bd53b01d986ebd51d67f
1 #!/bin/bash
2 # Copyright (C) by Wolfgang Dautermann
3 # License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
4 # This is free software: you are free to change and redistribute it.
5 # There is NO WARRANTY, to the extent permitted by law.
8 # That script tries to find all Maxima 'packages' and load them
9 # - once
10 # - twice
11 # - any combination of two packages
12 # to find incompatibilities, not working packages, etc.
14 # Usage: Call
15 # tests/testpackages.sh
16 # from the Maxima source directory (the script expects a compiled
17 # Maxima there (./maxima-local is called...)
19 # The question is - what is really a "package" and what is just a
20 # helper file for other packages?
21 # currently all Maxima ".mac" files are loaded
22 # (except for some testing and demo files)
24 # Yes, I know, Lisp files should also be considered.
26 # Some packages create a gnuplot window, so the script requires a working X Display
27 # (and can't (currently) be run from a cron-job).
29 # Do everything in English
30 export LANG=C
32 packages=""
34 maxima="./maxima-local"
36 for i in share/**/*.mac ; do
37 package1=$(echo "$i" | sed s+.*/++ | sed s+.mac$++)
38 if [[ ${package1:0:5} != "rtest" && ${package1:0:5} != "test-" && ${package1:0:4} != "prob" && $package1 != "tendemo" && $package1 != "simplify_sum_test" && $package1 != "test_orthopoly" ]] ; then
39 packages="$packages $package1"
41 done
43 true >report-single-packages.txt
44 # test single packages
45 for i in $packages ; do
46 echo "---------------- Testing: $i ----------------"
47 $maxima --quiet --run-string="load(\"$i\");quit();"
48 done </dev/null >>report-single-packages.txt 2>&1
49 echo "Loading single package test finished"
51 true >report-packages-twice.txt
52 # test loading packages twice
53 for i in $packages ; do
54 echo "---------------- Testing: $i twice ----------------"
55 $maxima --quiet --run-string="load(\"$i\");load(\"$i\");quit();"
56 done </dev/null >>report-packages-twice.txt 2>&1
57 echo "Loading packages twice test finished"
59 # The combination test runs very long.
60 # If you do not need it, you may want to insert an "exit" commaƄd here..
62 true >report-packages-combination.txt
63 # test loading a combination of packages
64 for i in $packages ; do
65 for j in $packages ; do
66 echo "---------------- Testing: $i and $j ----------------"
67 $maxima --quiet --run-string="load(\"$i\");load(\"$j\");quit();"
68 done
69 done </dev/null >>report-packages-combination.txt 2>&1
70 echo "Loading package combination test finished"