mbedtls/tests
Gilles Peskine b7bb068b84 Avoid using grep for test case names if possible
If `$FILTER` (`-f`) and `$EXCLUDE` (`-e`) are simple selections that
can be expressed as shell patterns, use a case statement instead of
calling grep to determine whether a test case should be executed.
Using a case statement significantly reduces the time it takes to
determine that a test case is excluded (but the improvement is small
compared to running the test).

This noticeably speeds up running a single test or a small number of
tests. Before:
```
tests/ssl-opt.sh -f Default  1.75s user 0.54s system 79% cpu 2.885 total
```
After:
```
tests/ssl-opt.sh -f Default  0.37s user 0.14s system 29% cpu 1.715 total
```
There is no perceptible difference when running a large number of tests.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-03-10 23:31:05 +01:00
..
.jenkins Add Jenkinsfile for PR job 2018-10-19 15:25:10 +01:00
configs Update copyright notices to use Linux Foundation guidance 2020-08-19 16:37:36 +02:00
data_files Merge pull request #3596 from gilles-peskine-arm/cert-gen-cleanup-202008-2.16 2020-10-15 13:33:12 +02:00
git-scripts Fix license header in pre-commit hook 2020-08-19 17:54:47 +02:00
scripts Add a build with MBEDTLS_ERROR_STRERROR_DUMMY 2020-11-16 13:09:41 +01:00
suites Merge pull request #3602 from gufe44/arc4random_buf-implicit-2.16 2020-11-12 12:12:45 +01:00
.gitignore Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
CMakeLists.txt Merge remote-tracking branch 'origin/pr/2293' into mbedtls-2.16 2019-03-05 16:31:02 +00:00
compat.sh Fix printf escape errors in shell scripts 2020-10-27 23:41:28 +01:00
Descriptions.txt Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Makefile Merge remote-tracking branch 'origin/pr/2053' into mbedtls-2.16 2019-06-21 15:59:16 +01:00
ssl-opt.sh Avoid using grep for test case names if possible 2021-03-10 23:31:05 +01:00