Gavin Howard | 805cd41 | 2019-01-05 19:34:35 -0700 | [diff] [blame] | 1 | #! /bin/sh |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 2 | # |
| 3 | # Copyright 2018 Gavin D. Howard |
| 4 | # |
| 5 | # Permission to use, copy, modify, and/or distribute this software for any |
| 6 | # purpose with or without fee is hereby granted. |
| 7 | # |
| 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
| 9 | # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| 10 | # AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
| 11 | # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| 12 | # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
| 13 | # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 14 | # PERFORMANCE OF THIS SOFTWARE. |
| 15 | # |
| 16 | |
| 17 | usage() { |
Gavin Howard | 74d2b8d | 2019-01-29 12:52:41 -0700 | [diff] [blame] | 18 | printf 'usage: %s [run_tests] [test_with_gcc]\n' "$script" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 19 | exit 1 |
| 20 | } |
| 21 | |
| 22 | header() { |
| 23 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 24 | local msg="$1" |
| 25 | shift |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 26 | |
Gavin Howard | 805cd41 | 2019-01-05 19:34:35 -0700 | [diff] [blame] | 27 | printf '\n' |
Gavin Howard | 03e2467 | 2019-01-05 19:47:22 -0700 | [diff] [blame] | 28 | printf '*******************\n' |
Gavin Howard | 805cd41 | 2019-01-05 19:34:35 -0700 | [diff] [blame] | 29 | printf '%s...\n' "$msg" |
Gavin Howard | 03e2467 | 2019-01-05 19:47:22 -0700 | [diff] [blame] | 30 | printf '*******************\n' |
Gavin Howard | 805cd41 | 2019-01-05 19:34:35 -0700 | [diff] [blame] | 31 | printf '\n' |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 32 | } |
| 33 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 34 | do_make() { |
| 35 | make -j4 "$@" |
| 36 | } |
| 37 | |
Gavin Howard | b026ebd | 2019-01-05 19:44:49 -0700 | [diff] [blame] | 38 | configure() { |
| 39 | |
| 40 | local CFLAGS="$1" |
| 41 | shift |
| 42 | |
| 43 | local CC="$1" |
| 44 | shift |
| 45 | |
| 46 | local configure_flags="$1" |
| 47 | shift |
| 48 | |
Gavin Howard | bffa6c9 | 2019-01-11 23:12:19 -0700 | [diff] [blame] | 49 | if [ "$CC" = "clang" ]; then |
| 50 | CFLAGS="$clang_flags $CFLAGS" |
| 51 | fi |
| 52 | |
Gavin Howard | 79f605c | 2019-01-08 13:08:21 -0700 | [diff] [blame] | 53 | header "Running \"./configure.sh $configure_flags\" with CC=\"$CC\" and CFLAGS=\"$CFLAGS\"" |
| 54 | CFLAGS="$CFLAGS" CC="$CC" ./configure.sh $configure_flags > /dev/null |
Gavin Howard | b026ebd | 2019-01-05 19:44:49 -0700 | [diff] [blame] | 55 | |
| 56 | } |
| 57 | |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 58 | build() { |
| 59 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 60 | local CFLAGS="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 61 | shift |
| 62 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 63 | local CC="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 64 | shift |
| 65 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 66 | local configure_flags="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 67 | shift |
| 68 | |
Gavin Howard | b026ebd | 2019-01-05 19:44:49 -0700 | [diff] [blame] | 69 | configure "$CFLAGS" "$CC" "$configure_flags" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 70 | |
Gavin Howard | b026ebd | 2019-01-05 19:44:49 -0700 | [diff] [blame] | 71 | header "Building with CC=\"$CC\" and CFLAGS=\"$CFLAGS\"" |
| 72 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 73 | do_make > /dev/null 2> "$scriptdir/.test.txt" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 74 | |
| 75 | if [ -s "$scriptdir/.test.txt" ]; then |
Gavin Howard | 805cd41 | 2019-01-05 19:34:35 -0700 | [diff] [blame] | 76 | printf '%s generated warning(s):\n' "$CC" |
| 77 | printf '\n' |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 78 | cat "$scriptdir/.test.txt" |
| 79 | exit 1 |
| 80 | fi |
| 81 | } |
| 82 | |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 83 | runtest() { |
| 84 | |
| 85 | header "Running tests" |
| 86 | |
Gavin Howard | 95358a9 | 2019-01-08 01:17:29 -0700 | [diff] [blame] | 87 | if [ "$#" -gt 0 ]; then |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 88 | do_make "$@" |
Gavin Howard | 95358a9 | 2019-01-08 01:17:29 -0700 | [diff] [blame] | 89 | else |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 90 | do_make test |
Gavin Howard | 95358a9 | 2019-01-08 01:17:29 -0700 | [diff] [blame] | 91 | fi |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | runconfigtests() { |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 95 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 96 | local CFLAGS="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 97 | shift |
| 98 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 99 | local CC="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 100 | shift |
| 101 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 102 | local configure_flags="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 103 | shift |
| 104 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 105 | local run_tests="$1" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 106 | shift |
| 107 | |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 108 | if [ "$run_tests" -ne 0 ]; then |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 109 | header "Running tests with configure flags \"$configure_flags\", CC=\"$CC\", and CFLAGS=\"$CFLAGS\"" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 110 | else |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 111 | header "Building with configure flags \"$configure_flags\", CC=\"$CC\", and CFLAGS=\"$CFLAGS\"" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 112 | fi |
| 113 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 114 | build "$CFLAGS" "$CC" "$configure_flags" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 115 | if [ "$run_tests" -ne 0 ]; then |
| 116 | runtest |
| 117 | fi |
| 118 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 119 | do_make clean |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 120 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 121 | build "$CFLAGS" "$CC" "$configure_flags -b" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 122 | if [ "$run_tests" -ne 0 ]; then |
| 123 | runtest |
| 124 | fi |
| 125 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 126 | do_make clean |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 127 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 128 | build "$CFLAGS" "$CC" "$configure_flags -d" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 129 | if [ "$run_tests" -ne 0 ]; then |
| 130 | runtest |
| 131 | fi |
| 132 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 133 | do_make clean |
Gavin Howard | 6e27dec | 2018-10-24 17:38:34 -0600 | [diff] [blame] | 134 | } |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 135 | |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 136 | runtestseries() { |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 137 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 138 | local CFLAGS="$1" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 139 | shift |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 140 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 141 | local CC="$1" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 142 | shift |
| 143 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 144 | local run_tests="$1" |
Gavin Howard | 8c4780b | 2019-01-04 12:37:33 -0700 | [diff] [blame] | 145 | shift |
| 146 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 147 | runconfigtests "$CFLAGS" "$CC" "" "$run_tests" |
| 148 | runconfigtests "$CFLAGS" "$CC" "-E" "$run_tests" |
| 149 | runconfigtests "$CFLAGS" "$CC" "-H" "$run_tests" |
| 150 | runconfigtests "$CFLAGS" "$CC" "-R" "$run_tests" |
| 151 | runconfigtests "$CFLAGS" "$CC" "-S" "$run_tests" |
| 152 | runconfigtests "$CFLAGS" "$CC" "-EH" "$run_tests" |
| 153 | runconfigtests "$CFLAGS" "$CC" "-ER" "$run_tests" |
| 154 | runconfigtests "$CFLAGS" "$CC" "-ES" "$run_tests" |
| 155 | runconfigtests "$CFLAGS" "$CC" "-HR" "$run_tests" |
| 156 | runconfigtests "$CFLAGS" "$CC" "-HS" "$run_tests" |
| 157 | runconfigtests "$CFLAGS" "$CC" "-RS" "$run_tests" |
| 158 | runconfigtests "$CFLAGS" "$CC" "-EHR" "$run_tests" |
| 159 | runconfigtests "$CFLAGS" "$CC" "-EHS" "$run_tests" |
| 160 | runconfigtests "$CFLAGS" "$CC" "-ERS" "$run_tests" |
| 161 | runconfigtests "$CFLAGS" "$CC" "-HRS" "$run_tests" |
| 162 | runconfigtests "$CFLAGS" "$CC" "-EHRS" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 163 | } |
| 164 | |
| 165 | runtests() { |
| 166 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 167 | local CFLAGS="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 168 | shift |
| 169 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 170 | local CC="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 171 | shift |
| 172 | |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 173 | local run_tests="$1" |
| 174 | shift |
| 175 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 176 | runtestseries "$CFLAGS" "$CC" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 177 | } |
| 178 | |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 179 | karatsuba() { |
| 180 | |
| 181 | header "Running Karatsuba tests" |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 182 | do_make karatsuba_test |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | vg() { |
| 186 | |
| 187 | header "Running valgrind" |
| 188 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 189 | build "$reldebug" "$CC" "-g" |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 190 | runtest valgrind |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 191 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 192 | do_make clean_config |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 193 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 194 | build "$reldebug" "$CC" "-gb" |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 195 | runtest valgrind |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 196 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 197 | do_make clean_config |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 198 | |
Gavin Howard | d4fece3 | 2019-01-08 02:06:22 -0700 | [diff] [blame] | 199 | build "$reldebug" "$CC" "-gd" |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 200 | runtest valgrind |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 201 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 202 | do_make clean_config |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 203 | } |
| 204 | |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 205 | debug() { |
| 206 | |
Gavin Howard | 6f1aa5a | 2019-01-04 13:29:04 -0700 | [diff] [blame] | 207 | local CC="$1" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 208 | shift |
| 209 | |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 210 | local run_tests="$1" |
| 211 | shift |
| 212 | |
| 213 | runtests "$debug" "$CC" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 214 | |
Gavin Howard | 1522c5a | 2019-01-05 20:17:40 -0700 | [diff] [blame] | 215 | if [ "$CC" = "clang" -a "$run_tests" -ne 0 ]; then |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 216 | runtests "$debug -fsanitize=address" "$CC" "$run_tests" |
| 217 | runtests "$debug -fsanitize=undefined" "$CC" "$run_tests" |
| 218 | runtests "$debug -fsanitize=memory" "$CC" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 219 | fi |
| 220 | } |
| 221 | |
| 222 | release() { |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 223 | |
| 224 | local CC="$1" |
| 225 | shift |
| 226 | |
| 227 | local run_tests="$1" |
| 228 | shift |
| 229 | |
| 230 | runtests "$release" "$CC" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | reldebug() { |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 234 | |
| 235 | local CC="$1" |
| 236 | shift |
| 237 | |
| 238 | local run_tests="$1" |
| 239 | shift |
| 240 | |
| 241 | runtests "$reldebug" "$CC" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | minsize() { |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 245 | |
| 246 | local CC="$1" |
| 247 | shift |
| 248 | |
| 249 | local run_tests="$1" |
| 250 | shift |
| 251 | |
| 252 | runtests "$minsize" "$CC" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 253 | } |
| 254 | |
Gavin Howard | bffa6c9 | 2019-01-11 23:12:19 -0700 | [diff] [blame] | 255 | clang_flags="-Weverything -Wno-padded -Wno-switch-enum -Wno-format-nonliteral" |
| 256 | clang_flags="$clang_flags -Wno-cast-align -Wno-missing-noreturn -Wno-disabled-macro-expansion" |
| 257 | clang_flags="$clang_flags -Wno-unreachable-code -Wno-unreachable-code-return" |
| 258 | |
Gavin Howard | 6fe912a | 2019-02-02 12:45:37 -0700 | [diff] [blame^] | 259 | cflags="-Wall -Wextra -Werror -pedantic -std=c99" |
Gavin Howard | db6b3fc | 2019-01-04 21:51:46 -0700 | [diff] [blame] | 260 | |
| 261 | debug="$cflags -g -O0 -fno-omit-frame-pointer" |
| 262 | release="$cflags -DNDEBUG -O3" |
| 263 | reldebug="$cflags -O3 -g -fno-omit-frame-pointer" |
| 264 | minsize="$cflags -DNDEBUG -Os" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 265 | |
| 266 | set -e |
| 267 | |
| 268 | script="$0" |
| 269 | scriptdir=$(dirname "$script") |
| 270 | |
Gavin Howard | 30a203e | 2019-01-05 19:37:03 -0700 | [diff] [blame] | 271 | if [ "$#" -gt 0 ]; then |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 272 | run_tests="$1" |
| 273 | shift |
| 274 | else |
| 275 | run_tests=1 |
| 276 | fi |
| 277 | |
| 278 | if [ "$#" -gt 0 ]; then |
Gavin Howard | bbb5ec3 | 2019-01-05 19:45:30 -0700 | [diff] [blame] | 279 | test_with_gcc="$1" |
| 280 | shift |
| 281 | else |
| 282 | test_with_gcc=1 |
| 283 | fi |
| 284 | |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 285 | cd "$scriptdir" |
| 286 | |
Gavin Howard | b65f0f8 | 2019-01-24 16:22:08 -0700 | [diff] [blame] | 287 | build "$debug" "clang" "" |
| 288 | |
| 289 | header "Running math library under --standard" |
| 290 | |
| 291 | echo "quit" | bin/bc -ls |
Gavin Howard | b026ebd | 2019-01-05 19:44:49 -0700 | [diff] [blame] | 292 | |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 293 | version=$(make version) |
| 294 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 295 | do_make clean_tests |
Gavin Howard | 68f4a4e | 2019-01-07 17:50:15 -0700 | [diff] [blame] | 296 | |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 297 | debug "clang" "$run_tests" |
| 298 | release "clang" "$run_tests" |
| 299 | reldebug "clang" "$run_tests" |
| 300 | minsize "clang" "$run_tests" |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 301 | |
Gavin Howard | 91afc87 | 2019-01-05 20:22:37 -0700 | [diff] [blame] | 302 | if [ "$test_with_gcc" -ne 0 ]; then |
Gavin Howard | bbb5ec3 | 2019-01-05 19:45:30 -0700 | [diff] [blame] | 303 | debug "gcc" "$run_tests" |
| 304 | release "gcc" "$run_tests" |
| 305 | reldebug "gcc" "$run_tests" |
| 306 | minsize "gcc" "$run_tests" |
| 307 | fi |
Gavin Howard | 4052e03 | 2018-10-23 17:22:57 -0600 | [diff] [blame] | 308 | |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 309 | if [ "$run_tests" -ne 0 ]; then |
Gavin Howard | c7ae8af | 2019-01-10 09:33:47 -0700 | [diff] [blame] | 310 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 311 | build "$release" "clang" "" |
Gavin Howard | bc8cf8c | 2019-01-16 11:29:03 -0700 | [diff] [blame] | 312 | |
Gavin Howard | d2143fb | 2019-01-04 22:00:30 -0700 | [diff] [blame] | 313 | karatsuba |
| 314 | vg |
Gavin Howard | 1620812 | 2018-10-24 17:20:45 -0600 | [diff] [blame] | 315 | |
Gavin Howard | ecbee38 | 2019-02-01 12:46:26 -0700 | [diff] [blame] | 316 | build "$reldebug" "afl-gcc" "" |
Gavin Howard | cf61474 | 2019-01-05 20:27:16 -0700 | [diff] [blame] | 317 | |
| 318 | printf '\n' |
| 319 | printf 'Run %s/tests/randmath.py and the fuzzer.\n' "$scriptdir" |
| 320 | printf 'Then run the GitHub release script as follows:\n' |
| 321 | printf '\n' |
Gavin Howard | 74d2b8d | 2019-01-29 12:52:41 -0700 | [diff] [blame] | 322 | printf ' <github_release> %s <msg> release.sh RELEASE.md \\\n' "$version" |
Gavin Howard | c083fad | 2019-01-09 09:55:09 -0700 | [diff] [blame] | 323 | printf ' tests/afl.py tests/randmath.py tests/bc/scripts/timeconst.bc\n' |
Gavin Howard | cf61474 | 2019-01-05 20:27:16 -0700 | [diff] [blame] | 324 | |
| 325 | fi |