]> granicus.if.org Git - esp-idf/commitdiff
test: Tweaks to reduce variation in CI unit tests
authorAngus Gratton <angus@espressif.com>
Fri, 8 Jun 2018 04:42:44 +0000 (14:42 +1000)
committerAngus Gratton <gus@projectgus.com>
Fri, 8 Jun 2018 04:42:44 +0000 (14:42 +1000)
spi test: Prime the flash cache before each test to minimise flash cache misses.

VFS performance test: Increase the number of runs to minimise influence of an isolated bad run.

components/driver/test/test_spi_master.c
components/vfs/test/test_vfs_fd.c

index 64b3544baa80a6cba554de508a06ed7d4594141e..329f3fe6a247cf251f24770911f3f7982ef20374 100644 (file)
@@ -1311,6 +1311,7 @@ TEST_CASE("spi_speed","[spi]")
     //record flight time by isr, with DMA
     t_flight_num = 0;
     for (int i = 0; i < TEST_TIMES; i++) {
+        spi_device_transmit(spi, &trans); // prime the flash cache
         RECORD_TIME_START();
         spi_device_transmit(spi, &trans);
         RECORD_TIME_END(&t_flight);
index c4292d3fca0d11befd1cc461940c6631ea939c4c..48396e606727457c2a9dd6c7badfcb2b29c46c48 100644 (file)
@@ -243,7 +243,7 @@ TEST_CASE("Open & write & close through VFS passes performance test", "[vfs]")
     TEST_ESP_OK( esp_vfs_register(VFS_PREF1, &desc, NULL) );
 
     const int64_t begin = esp_timer_get_time();
-    const int iter_count = 1000;
+    const int iter_count = 5000;
 
     for (int i = 0; i < iter_count; ++i) {
         const int fd = open(VFS_PREF1 FILE1, 0, 0);