unit_test: Refactor all performance tests that rely on cache compensated timer

There is no ccomp timer on C3, which means our performance tests will start
failing again due to variance caused by cache misses.

This MR adds TEST_PERFORMANCE_CCOMP_ macro that will only fail
performance test if CCOMP timer is supported on the target
This commit is contained in:
Marius Vikhammer
2020-12-04 11:35:21 +08:00
committed by Angus Gratton
parent 7ed95d13b1
commit 0a95151a75
13 changed files with 42 additions and 22 deletions

View File

@@ -63,8 +63,8 @@ TEST_CASE("Test esp_sha()", "[hw_crypto]")
free(buffer);
TEST_PERFORMANCE_LESS_THAN(TIME_SHA1_32KB, "%dus", us_sha1);
TEST_PERFORMANCE_LESS_THAN(TIME_SHA512_32KB, "%dus", us_sha512);
TEST_PERFORMANCE_CCOMP_LESS_THAN(TIME_SHA1_32KB, "%dus", us_sha1);
TEST_PERFORMANCE_CCOMP_LESS_THAN(TIME_SHA512_32KB, "%dus", us_sha512);
}
TEST_CASE("Test esp_sha() function with long input", "[hw_crypto]")