ci(system): fixed and enabled misc system build tests

This commit is contained in:
Marius Vikhammer
2023-11-28 12:10:55 +08:00
parent 676968ab0e
commit b96f93b879
25 changed files with 84 additions and 62 deletions

View File

@@ -5,7 +5,3 @@ components/esp_rom/test_apps:
- if: IDF_TARGET in ["esp32", "esp32c2"]
temporary: false
reason: lack of memory for testing miniz compressing
disable:
- if: IDF_TARGET in ["esp32p4"]
temporary: true
reason: Not supported on p4 # TODO: IDF-8071

View File

@@ -1,2 +1,2 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |

View File

@@ -5,6 +5,7 @@
*/
#include <complex.h>
#include "unity.h"
#include "esp_rom_caps.h"
TEST_CASE("libgcc math functions", "[rom][libgcc]")
{
@@ -14,8 +15,6 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
TEST_ASSERT(__absvsi2(-1) == 1);
extern double __adddf3(double x, double y);
TEST_ASSERT(__adddf3(1.0, 4.0) == 5.0);
extern float __addsf3(float x, float y);
TEST_ASSERT(__addsf3(1.0f, 4.0f) == 5.0f);
extern int64_t __addvdi3(int64_t x, int64_t y);
TEST_ASSERT(__addvdi3(1L, 4L) == 5L);
extern int __addvsi3(int x, int y);
@@ -56,8 +55,7 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
TEST_ASSERT(__divsi3(16, 2) == 8);
extern int __eqdf2(double x, double y);
TEST_ASSERT(__eqdf2(4.0, 4.0) == 0);
extern int __eqsf2(float x, float y);
TEST_ASSERT(__eqsf2(4.0f, 4.0f) == 0);
extern double __extendsfdf2(float x);
TEST_ASSERT(__extendsfdf2(4.0f) == 4.0);
extern int __ffsdi2(uint64_t x);
@@ -70,8 +68,6 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
TEST_ASSERT(__fixdfsi(4.0) == 4);
extern int64_t __fixsfdi(float x);
TEST_ASSERT(__fixsfdi(4.0f) == 4LL);
extern int __fixsfsi(float x);
TEST_ASSERT(__fixsfsi(4.0f) == 4);
extern unsigned __fixunsdfsi(double x);
TEST_ASSERT(__fixunsdfsi(16.0) == 16);
extern uint64_t __fixunssfdi(float x);
@@ -84,34 +80,24 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
TEST_ASSERT(__floatdisf(-1LL) == -1.0f);
extern double __floatsidf(int x);
TEST_ASSERT(__floatsidf(-1) == -1.0);
extern float __floatsisf(int x);
TEST_ASSERT(__floatsisf(-1) == -1.0f);
extern double __floatundidf(uint64_t x);
TEST_ASSERT(__floatundidf(16) == 16.0);
extern float __floatundisf(uint64_t x);
TEST_ASSERT(__floatundisf(16) == 16.0f);
extern double __floatunsidf(unsigned x);
TEST_ASSERT(__floatunsidf(16) == 16.0);
extern float __floatunsisf(unsigned x);
TEST_ASSERT(__floatunsisf(16) == 16.0f);
extern int __gedf2(double x, double y);
TEST_ASSERT(__gedf2(2.0, 0.0) >= 0);
extern int __gesf2(float x, float y);
TEST_ASSERT(__gesf2(2.0f, 0.0f) >= 0);
extern int __gtdf2(double x, double y);
TEST_ASSERT(__gtdf2(2.0, 0.0) >= 0);
extern int __gtsf2(float x, float y);
TEST_ASSERT(__gtsf2(2.0f, 0.0f) >= 0);
extern int __ledf2(double x, double y);
TEST_ASSERT(__ledf2(0.0, 2.0) <= 0);
extern int __lesf2(float x, float y);
TEST_ASSERT(__lesf2(0.0f, 2.0f) <= 0);
extern int64_t __lshrdi3(int64_t x, int y);
TEST_ASSERT(__lshrdi3(0x8000000000000000LL, 1) == 0x4000000000000000LL);
extern int __ltdf2(double x, double y);
TEST_ASSERT(__ltdf2(0.0, 2.0) < 0);
extern int __ltsf2(float x, float y);
TEST_ASSERT(__ltsf2(0.0f, 2.0f) < 0);
extern int64_t __moddi3(int64_t x, int64_t y);
TEST_ASSERT(__moddi3(15, 2) == 1);
extern int __modsi3(int x, int y);
@@ -124,8 +110,7 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
TEST_ASSERT(__muldi3(2, 8) == 16);
extern complex float __mulsc3(float a, float b, float c, float d);
TEST_ASSERT(__mulsc3(1.0f, 0.0f, 0.0f, -1.0f) == -I);
extern float __mulsf3(float a, float b);
TEST_ASSERT(__mulsf3(2.0f, 8.0f) == 16.0f);
extern int __mulsi3(int x, int y);
TEST_ASSERT(__mulsi3(2, 8) == 16);
extern int __mulvdi3(int64_t x, int64_t y);
@@ -138,14 +123,12 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
TEST_ASSERT(__negdf2(1.0) == -1.0);
extern int64_t __negdi2(int64_t x);
TEST_ASSERT(__negdi2(-1LL) == 1);
extern float __negsf2(float x);
TEST_ASSERT(__negsf2(-1.0f) == 1.0f);
extern int64_t __negvdi2(int64_t x);
TEST_ASSERT(__negvdi2(-1LL) == 1);
extern int __negvsi2(int x);
TEST_ASSERT(__negvsi2(-1) == 1);
extern int __nesf2(float x, float y);
TEST_ASSERT(__nesf2(2.0, 0.0) != 0);
extern int __paritysi2(unsigned x);
TEST_ASSERT(__paritysi2(0x10101010) == 0);
extern int __popcountdi2(uint64_t);
@@ -158,8 +141,7 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
TEST_ASSERT(__powisf2(2.0f, 2) == 4.0f);
extern double __subdf3(double x, double y);
TEST_ASSERT(__subdf3(2.0, 1.0) == 1.0);
extern float __subsf3(float x, float y);
TEST_ASSERT(__subsf3(5.0f, 4.0f) == 1.0f);
extern int64_t __subvdi3(int64_t x, int64_t y);
TEST_ASSERT(__subvdi3(-1LL, -1LL) == 0);
extern int __subvsi3(int x, int y);
@@ -186,6 +168,36 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]")
#endif
extern int __unorddf2(double x, double y);
TEST_ASSERT(__unorddf2(1.0, 2.0) == 0);
#if ESP_ROM_HAS_SW_FLOAT
extern float __addsf3(float x, float y);
TEST_ASSERT(__addsf3(1.0f, 4.0f) == 5.0f);
extern int __eqsf2(float x, float y);
TEST_ASSERT(__eqsf2(4.0f, 4.0f) == 0);
extern int __fixsfsi(float x);
TEST_ASSERT(__fixsfsi(4.0f) == 4);
extern float __floatsisf(int x);
TEST_ASSERT(__floatsisf(-1) == -1.0f);
extern float __floatunsisf(unsigned x);
TEST_ASSERT(__floatunsisf(16) == 16.0f);
TEST_ASSERT(__gedf2(2.0, 0.0) >= 0);
extern int __gesf2(float x, float y);
TEST_ASSERT(__gesf2(2.0f, 0.0f) >= 0);
extern int __gtsf2(float x, float y);
TEST_ASSERT(__gtsf2(2.0f, 0.0f) >= 0);
extern int __lesf2(float x, float y);
TEST_ASSERT(__lesf2(0.0f, 2.0f) <= 0);
extern int __ltsf2(float x, float y);
TEST_ASSERT(__ltsf2(0.0f, 2.0f) < 0);
extern float __mulsf3(float a, float b);
TEST_ASSERT(__mulsf3(2.0f, 8.0f) == 16.0f);
extern float __negsf2(float x);
TEST_ASSERT(__negsf2(-1.0f) == 1.0f);
extern int __nesf2(float x, float y);
TEST_ASSERT(__nesf2(2.0, 0.0) != 0);
extern float __subsf3(float x, float y);
TEST_ASSERT(__subsf3(5.0f, 4.0f) == 1.0f);
extern int __unordsf2(float x, float y);
TEST_ASSERT(__unordsf2(2.0f, 1.0f) == 0);
#endif //ESP_ROM_HAS_SW_FLOAT
}