Artifact
4b0e755a541c0ac84b389e5ed1d2ffe283ea2982a6655bebf7d423f5e14aa2a1:
- File
tests/test_vectors/Hash/all.tcl
— part of check-in
[feef0d0cef]
at
2023-12-24 06:36:24
on branch crypto
— Added MAC test vectors.
Added all.tcl files to each test subdirectory so all tests run.
Updated Hash and KDF test vectors to add missing cleanupTests.
Corrected bug with using dash in constraints.
Added constraints for ciphers, digests, and kdfs.
(user:
bohagan,
size: 1297)
[annotate]
[blame]
[check-ins using]
- File
tests/test_vectors/KDF/all.tcl
— part of check-in
[feef0d0cef]
at
2023-12-24 06:36:24
on branch crypto
— Added MAC test vectors.
Added all.tcl files to each test subdirectory so all tests run.
Updated Hash and KDF test vectors to add missing cleanupTests.
Corrected bug with using dash in constraints.
Added constraints for ciphers, digests, and kdfs.
(user:
bohagan,
size: 1297)
[annotate]
[blame]
[check-ins using]
- File
tests/test_vectors/MAC/all.tcl
— part of check-in
[feef0d0cef]
at
2023-12-24 06:36:24
on branch crypto
— Added MAC test vectors.
Added all.tcl files to each test subdirectory so all tests run.
Updated Hash and KDF test vectors to add missing cleanupTests.
Corrected bug with using dash in constraints.
Added constraints for ciphers, digests, and kdfs.
(user:
bohagan,
size: 1297)
[annotate]
[blame]
[check-ins using]
- File
tests/test_vectors/all.tcl
— part of check-in
[feef0d0cef]
at
2023-12-24 06:36:24
on branch crypto
— Added MAC test vectors.
Added all.tcl files to each test subdirectory so all tests run.
Updated Hash and KDF test vectors to add missing cleanupTests.
Corrected bug with using dash in constraints.
Added constraints for ciphers, digests, and kdfs.
(user:
bohagan,
size: 1297)
[annotate]
[blame]
[check-ins using]
0000: 23 20 61 6c 6c 2e 74 63 6c 20 2d 2d 0a 23 0a 23 # all.tcl --.#.#
0010: 20 54 68 69 73 20 66 69 6c 65 20 63 6f 6e 74 61 This file conta
0020: 69 6e 73 20 61 20 74 6f 70 2d 6c 65 76 65 6c 20 ins a top-level
0030: 73 63 72 69 70 74 20 74 6f 20 72 75 6e 20 61 6c script to run al
0040: 6c 20 6f 66 20 74 68 65 20 54 63 6c 0a 23 20 74 l of the Tcl.# t
0050: 65 73 74 73 2e 20 20 45 78 65 63 75 74 65 20 69 ests. Execute i
0060: 74 20 62 79 20 69 6e 76 6f 6b 69 6e 67 20 22 73 t by invoking "s
0070: 6f 75 72 63 65 20 61 6c 6c 2e 74 65 73 74 22 20 ource all.test"
0080: 77 68 65 6e 20 72 75 6e 6e 69 6e 67 20 74 63 6c when running tcl
0090: 74 65 73 74 0a 23 20 69 6e 20 74 68 69 73 20 64 test.# in this d
00a0: 69 72 65 63 74 6f 72 79 2e 0a 23 0a 23 20 43 6f irectory..#.# Co
00b0: 70 79 72 69 67 68 74 20 28 63 29 20 31 39 39 38 pyright (c) 1998
00c0: 2d 32 30 30 30 20 62 79 20 41 6a 75 62 61 20 53 -2000 by Ajuba S
00d0: 6f 6c 75 74 69 6f 6e 73 2e 0a 23 20 41 6c 6c 20 olutions..# All
00e0: 72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 2e rights reserved.
00f0: 0a 23 0a 23 20 52 43 53 3a 20 40 28 23 29 20 24 .#.# RCS: @(#) $
0100: 49 64 3a 20 61 6c 6c 2e 74 63 6c 2c 76 20 31 2e Id: all.tcl,v 1.
0110: 35 20 32 30 30 30 2f 30 38 2f 31 35 20 31 38 3a 5 2000/08/15 18:
0120: 34 35 3a 30 31 20 68 6f 62 62 73 20 45 78 70 20 45:01 hobbs Exp
0130: 24 0a 0a 69 66 20 7b 5b 6c 73 65 61 72 63 68 20 $..if {[lsearch
0140: 5b 6e 61 6d 65 73 70 61 63 65 20 63 68 69 6c 64 [namespace child
0150: 72 65 6e 5d 20 3a 3a 74 63 6c 74 65 73 74 5d 20 ren] ::tcltest]
0160: 3d 3d 20 2d 31 7d 20 7b 0a 20 20 20 20 70 61 63 == -1} {. pac
0170: 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 63 6c kage require tcl
0180: 74 65 73 74 0a 20 20 20 20 6e 61 6d 65 73 70 61 test. namespa
0190: 63 65 20 69 6d 70 6f 72 74 20 3a 3a 74 63 6c 74 ce import ::tclt
01a0: 65 73 74 3a 3a 2a 0a 7d 0a 0a 73 65 74 20 3a 3a est::*.}..set ::
01b0: 74 63 6c 74 65 73 74 3a 3a 74 65 73 74 53 69 6e tcltest::testSin
01c0: 67 6c 65 46 69 6c 65 20 66 61 6c 73 65 0a 73 65 gleFile false.se
01d0: 74 20 3a 3a 74 63 6c 74 65 73 74 3a 3a 74 65 73 t ::tcltest::tes
01e0: 74 73 44 69 72 65 63 74 6f 72 79 20 5b 66 69 6c tsDirectory [fil
01f0: 65 20 64 69 72 20 5b 69 6e 66 6f 20 73 63 72 69 e dir [info scri
0200: 70 74 5d 5d 0a 0a 23 20 57 65 20 73 68 6f 75 6c pt]]..# We shoul
0210: 64 20 65 6e 73 75 72 65 20 74 68 61 74 20 74 68 d ensure that th
0220: 65 20 74 65 73 74 73 44 69 72 65 63 74 6f 72 79 e testsDirectory
0230: 20 69 73 20 61 62 73 6f 6c 75 74 65 2e 0a 23 20 is absolute..#
0240: 54 68 69 73 20 77 61 73 20 69 6e 74 72 6f 64 75 This was introdu
0250: 63 65 64 20 69 6e 20 54 63 6c 20 38 2e 33 2b 27 ced in Tcl 8.3+'
0260: 73 20 74 63 6c 74 65 73 74 2c 20 73 6f 20 77 65 s tcltest, so we
0270: 20 6e 65 65 64 20 61 20 63 61 74 63 68 2e 0a 63 need a catch..c
0280: 61 74 63 68 20 7b 3a 3a 74 63 6c 74 65 73 74 3a atch {::tcltest:
0290: 3a 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 20 3a :normalizePath :
02a0: 3a 74 63 6c 74 65 73 74 3a 3a 74 65 73 74 73 44 :tcltest::testsD
02b0: 69 72 65 63 74 6f 72 79 7d 0a 0a 23 0a 23 20 52 irectory}..#.# R
02c0: 75 6e 20 61 6c 6c 20 74 65 73 74 73 20 69 6e 20 un all tests in
02d0: 63 75 72 72 65 6e 74 20 61 6e 64 20 61 6e 79 20 current and any
02e0: 73 75 62 20 64 69 72 65 63 74 6f 72 69 65 73 20 sub directories
02f0: 77 69 74 68 20 61 6e 20 61 6c 6c 2e 74 63 6c 20 with an all.tcl
0300: 66 69 6c 65 2e 0a 23 0a 73 65 74 20 3a 3a 65 78 file..#.set ::ex
0310: 69 74 43 6f 64 65 20 30 0a 69 66 20 7b 5b 70 61 itCode 0.if {[pa
0320: 63 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 73 ckage vsatisfies
0330: 20 5b 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 [package requir
0340: 65 20 74 63 6c 74 65 73 74 5d 20 32 2e 35 2d 5d e tcltest] 2.5-]
0350: 7d 20 7b 0a 20 20 20 20 69 66 20 7b 5b 3a 3a 74 } {. if {[::t
0360: 63 6c 74 65 73 74 3a 3a 72 75 6e 41 6c 6c 54 65 cltest::runAllTe
0370: 73 74 73 5d 20 3d 3d 20 31 7d 20 7b 0a 09 73 65 sts] == 1} {..se
0380: 74 20 3a 3a 65 78 69 74 43 6f 64 65 20 31 0a 20 t ::exitCode 1.
0390: 20 20 20 7d 0a 0a 7d 20 65 6c 73 65 20 7b 0a 20 }..} else {.
03a0: 20 20 20 23 20 48 6f 6f 6b 20 74 6f 20 64 65 74 # Hook to det
03b0: 65 72 6d 69 6e 65 20 69 66 20 61 6e 79 20 6f 66 ermine if any of
03c0: 20 74 68 65 20 74 65 73 74 73 20 66 61 69 6c 65 the tests faile
03d0: 64 2e 20 54 68 65 6e 20 77 65 20 63 61 6e 20 65 d. Then we can e
03e0: 78 69 74 20 77 69 74 68 20 74 68 65 0a 20 20 20 xit with the.
03f0: 20 23 20 70 72 6f 70 65 72 20 65 78 69 74 20 63 # proper exit c
0400: 6f 64 65 3a 20 30 3d 61 6c 6c 20 70 61 73 73 65 ode: 0=all passe
0410: 64 2c 20 31 3d 6f 6e 65 20 6f 72 20 6d 6f 72 65 d, 1=one or more
0420: 20 66 61 69 6c 65 64 0a 20 20 20 20 70 72 6f 63 failed. proc
0430: 20 74 63 6c 74 65 73 74 3a 3a 63 6c 65 61 6e 75 tcltest::cleanu
0440: 70 54 65 73 74 73 48 6f 6f 6b 20 7b 7d 20 7b 0a pTestsHook {} {.
0450: 09 76 61 72 69 61 62 6c 65 20 6e 75 6d 54 65 73 .variable numTes
0460: 74 73 0a 09 73 65 74 20 3a 3a 65 78 69 74 43 6f ts..set ::exitCo
0470: 64 65 20 5b 65 78 70 72 20 7b 24 6e 75 6d 54 65 de [expr {$numTe
0480: 73 74 73 28 54 6f 74 61 6c 29 20 3d 3d 20 30 20 sts(Total) == 0
0490: 7c 7c 20 24 6e 75 6d 54 65 73 74 73 28 46 61 69 || $numTests(Fai
04a0: 6c 65 64 29 20 3e 20 30 7d 5d 0a 20 20 20 20 7d led) > 0}]. }
04b0: 0a 20 20 20 20 3a 3a 74 63 6c 74 65 73 74 3a 3a . ::tcltest::
04c0: 72 75 6e 41 6c 6c 54 65 73 74 73 0a 7d 0a 0a 23 runAllTests.}..#
04d0: 20 20 45 78 69 74 20 63 6f 64 65 3a 20 30 3d 61 Exit code: 0=a
04e0: 6c 6c 20 70 61 73 73 65 64 2c 20 31 3d 6f 6e 65 ll passed, 1=one
04f0: 20 6f 72 20 6d 6f 72 65 20 66 61 69 6c 65 64 0a or more failed.
0500: 65 78 69 74 20 24 3a 3a 65 78 69 74 43 6f 64 65 exit $::exitCode
0510: 0a .