Skip to contentSkip to conversation

test: add dependency for UT_LOG

PATCH New Kever Yang 2 participants 4 messages Jun 7, 2020

lore
Share & tools
lore

Kever Yang

author
#0 lore raw

PATCH 1/1 test: add dependency for UT_LOG

The callback of do_ut_log() is defined in test/log/test-main.c which is depend on CONFIG_LOG.

---

 test/Kconfig | 1 +
 1 file changed, 1 insertion(+)
test/Kconfig +1 -0
index 9b2f84b551..8c32fa5cbd 100644
@@ -42,6 +42,7 @@ endif
 
 config UT_LOG
 	bool "Unit tests for logging functions"
+	depends on LOG
 	depends on UNIT_TEST
 	default y
 	help
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 test: add dependency for UT_LOG

Am June 7, 2020 3:52:37 AM UTC schrieb Kever Yang <[email protected]>:

Quoted 2 lines

The callback of do_ut_log() is defined in test/log/test-main.c which is depend on CONFIG_LOG.

Where do you see such a dependency?

With which configuration did you have a build problem?

Quoted 15 lines

---

test/Kconfig | 1 +

1 file changed, 1 insertion(+)
test/Kconfig +0 -0
index 9b2f84b551..8c32fa5cbd 100644
@@ -42,6 +42,7 @@ endif
 

config UT_LOG
bool "Unit tests for logging functions"

test/Kconfig endif · line 45

Quoted 1 line
test/Kconfig +1 -0
+	depends on LOG

This seems incorrect. We want to run the nolog test if CONFIG_LOG=n.

See https://github.com/trini/u-boot/blob/master/test/log/Makefile#L15

Best regards

Heinrich

Quoted 3 lines

depends on UNIT_TEST
default y
help

author
#2 lore raw

PATCH 1/1 test: add dependency for UT_LOG

Quoted 6 lines · Heinrich Schuchardt

Am June 7, 2020 3:52:37 AM UTC schrieb Kever Yang <[email protected]>:

Quoted 2 lines

The callback of do_ut_log() is defined in test/log/test-main.c which is depend on CONFIG_LOG.

Where do you see such a dependency?

With which configuration did you have a build problem?

I met the issue when test with buildman.

If CONFIG_LOG is not set, the code under test/log will not be build according to

test/Makefile is :

obj-$(CONFIG_$(SPL_)LOG) += log/

check again with the code and seems I did not use the latest Makefile.

Please ignore this patch.

Thanks,

- Kever

Quoted 30 lines
Quoted 15 lines

---

test/Kconfig | 1 +

1 file changed, 1 insertion(+)
test/Kconfig +0 -0
index 9b2f84b551..8c32fa5cbd 100644
@@ -42,6 +42,7 @@ endif
 

config UT_LOG
bool "Unit tests for logging functions"

test/Kconfig endif · line 45

Quoted 1 line
test/Kconfig +1 -0
+	depends on LOG

This seems incorrect. We want to run the nolog test if CONFIG_LOG=n.

See https://github.com/trini/u-boot/blob/master/test/log/Makefile#L15

Best regards

Heinrich

Quoted 3 lines

depends on UNIT_TEST
default y
help

#3 lore raw

PATCH 1/1 test: add dependency for UT_LOG

Am June 7, 2020 11:29:38 AM UTC schrieb Kever Yang <[email protected]>:

Quoted 10 lines · Heinrich Schuchardt
Quoted 1 line

Am June 7, 2020 3:52:37 AM UTC schrieb Kever Yang

<[email protected]>:

Quoted 5 lines
Quoted 2 lines

The callback of do_ut_log() is defined in test/log/test-main.c which is depend on CONFIG_LOG.

Where do you see such a dependency?

With which configuration did you have a build problem?

Quoted 8 lines

I met the issue when test with buildman.

If CONFIG_LOG is not set, the code under test/log will not be build according to

test/Makefile is :

obj-$(CONFIG_$(SPL_)LOG) += log/

The current Makefile has:

obj-y += log/

As said if CONFIG_LOG=n, we want to build test/log/nolog_test.o.

Quoted 5 lines

check again with the code and seems I did not use the latest Makefile.

Please ignore this patch.

Nothing to worry about. Just come back if you have a reproducible problem case.

Best regards

Heinrich

Quoted 36 lines

Thanks,

- Kever

Quoted 30 lines
Quoted 15 lines

---

test/Kconfig | 1 +

1 file changed, 1 insertion(+)
test/Kconfig +0 -0
index 9b2f84b551..8c32fa5cbd 100644
@@ -42,6 +42,7 @@ endif
 

config UT_LOG
bool "Unit tests for logging functions"

test/Kconfig endif · line 45

Quoted 1 line
test/Kconfig +1 -0
+	depends on LOG

This seems incorrect. We want to run the nolog test if CONFIG_LOG=n.

See https://github.com/trini/u-boot/blob/master/test/log/Makefile#L15

Best regards

Heinrich

Quoted 3 lines

depends on UNIT_TEST
default y
help