Mercurial > octave
comparison test/mk-sparse-tst.sh @ 32064:5f5d8edbeb4f
* mk-sparse-tst.sh: Fix name of script in comments and messages.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 27 Apr 2023 13:26:53 -0400 |
parents | 3b9305e62bb7 |
children | c9e496db7951 |
comparison
equal
deleted
inserted
replaced
32063:3b9305e62bb7 | 32064:5f5d8edbeb4f |
---|---|
26 ######################################################################## | 26 ######################################################################## |
27 | 27 |
28 # Some tests are commented out because they are known to be broken! | 28 # Some tests are commented out because they are known to be broken! |
29 # Search for "# fails" | 29 # Search for "# fails" |
30 | 30 |
31 # ./build-sparse-tests.sh preset | 31 # ./mk-sparse-tst.sh preset |
32 # creates sparse.tst with preset tests. | 32 # creates sparse.tst with preset tests. |
33 # Use "test sparse.tst" from octave to run the tests. | 33 # Use "test sparse.tst" from octave to run the tests. |
34 # | 34 # |
35 # ./build-sparse-tests.sh random | 35 # ./mk-sparse-tst.sh random |
36 # Creates sprandom.tst with randomly generated matrices. | 36 # Creates sprandom.tst with randomly generated matrices. |
37 # Use "test sprandom.tst" from octave to run the tests. | 37 # Use "test sprandom.tst" from octave to run the tests. |
38 | 38 |
39 # build-sparse-tests.sh generates tests for real and complex sparse matrices. | 39 # mk-sparse-tst.sh generates tests for real and complex sparse matrices. |
40 # Also, we want to run both fixed tests with known outputs (quick tests) | 40 # Also, we want to run both fixed tests with known outputs (quick tests) |
41 # and longer tests with unknown outputs (thorough tests). This requires | 41 # and longer tests with unknown outputs (thorough tests). This requires |
42 # two sets of tests -- one which uses preset matrices and another which | 42 # two sets of tests -- one which uses preset matrices and another which |
43 # uses randomly generated matrices. | 43 # uses randomly generated matrices. |
44 # | 44 # |
115 | 115 |
116 case $1 in | 116 case $1 in |
117 random) preset=false ;; | 117 random) preset=false ;; |
118 preset) preset=true ;; | 118 preset) preset=true ;; |
119 '') preset=true ;; | 119 '') preset=true ;; |
120 *) echo "build-sparse-tests.sh random|preset" && exit 1 ;; | 120 *) echo "mk-sparse-tst.sh random|preset" && exit 1 ;; |
121 esac | 121 esac |
122 | 122 |
123 # create initial file | 123 # create initial file |
124 cat <<EOF | 124 cat <<EOF |
125 ## !!! DO NOT EDIT !!! | 125 ## !!! DO NOT EDIT !!! |
126 ## THIS IS AN AUTOMATICALLY GENERATED FILE | 126 ## THIS IS AN AUTOMATICALLY GENERATED FILE |
127 ## modify build-sparse-tests.sh to generate the tests you need. | 127 ## modify mk-sparse-tst.sh to generate the tests you need. |
128 EOF | 128 EOF |
129 | 129 |
130 | 130 |
131 # define all functions | 131 # define all functions |
132 | 132 |
270 ## total_passes += passes; | 270 ## total_passes += passes; |
271 ## total_tests += tests; | 271 ## total_tests += tests; |
272 ## end | 272 ## end |
273 ## The test log is appended to sprandomtest.log | 273 ## The test log is appended to sprandomtest.log |
274 function [passes,total] = test_sprandom | 274 function [passes,total] = test_sprandom |
275 warning ("untested --- fix the source in build-sparse-tests.sh"); | 275 warning ("untested --- fix the source in mk-sparse-tst.sh"); |
276 disp ("appending test output to sprandomtest.log"); | 276 disp ("appending test output to sprandomtest.log"); |
277 fid = fopen ("sprandomtest.log", "at"); | 277 fid = fopen ("sprandomtest.log", "at"); |
278 test ("sprandom.tst", "normal", fid); | 278 test ("sprandom.tst", "normal", fid); |
279 ##[passes, total] = test ("sprandomtest", "normal", fid); | 279 ##[passes, total] = test ("sprandomtest", "normal", fid); |
280 fclose (fid); | 280 fclose (fid); |