diff mbox series

test: add dependency for UT_LOG

Message ID 20200607035237.5996-1-kever.yang@rock-chips.com
State New
Headers show
Series test: add dependency for UT_LOG | expand

Commit Message

Kever Yang June 7, 2020, 3:52 a.m. UTC
The callback of do_ut_log() is defined in test/log/test-main.c
which is depend on CONFIG_LOG.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 test/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Heinrich Schuchardt June 7, 2020, 5:55 a.m. UTC | #1
Am June 7, 2020 3:52:37 AM UTC schrieb Kever Yang <kever.yang at rock-chips.com>:
>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?

>
>Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
>---
>
> test/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/test/Kconfig b/test/Kconfig
>index 9b2f84b551..8c32fa5cbd 100644
>--- a/test/Kconfig
>+++ b/test/Kconfig
>@@ -42,6 +42,7 @@ endif
> 
> config UT_LOG
> 	bool "Unit tests for logging functions"
>+	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


> 	depends on UNIT_TEST
> 	default y
> 	help
Kever Yang June 7, 2020, 11:29 a.m. UTC | #2
On 2020/6/7 ??1:55, Heinrich Schuchardt wrote:
> Am June 7, 2020 3:52:37 AM UTC schrieb Kever Yang <kever.yang at rock-chips.com>:
>> 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

>
>> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
>> ---
>>
>> test/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/test/Kconfig b/test/Kconfig
>> index 9b2f84b551..8c32fa5cbd 100644
>> --- a/test/Kconfig
>> +++ b/test/Kconfig
>> @@ -42,6 +42,7 @@ endif
>>
>> config UT_LOG
>> 	bool "Unit tests for logging functions"
>> +	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
>
>
>> 	depends on UNIT_TEST
>> 	default y
>> 	help
>
>
Heinrich Schuchardt June 7, 2020, 11:40 a.m. UTC | #3
Am June 7, 2020 11:29:38 AM UTC schrieb Kever Yang <kever.yang at rock-chips.com>:
>
>On 2020/6/7 ??1:55, Heinrich Schuchardt wrote:
>> Am June 7, 2020 3:52:37 AM UTC schrieb Kever Yang
><kever.yang at rock-chips.com>:
>>> 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/

The current Makefile has:

obj-y += log/

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

>
>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

>
>
>Thanks,
>
>- Kever
>
>>
>>> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
>>> ---
>>>
>>> test/Kconfig | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/test/Kconfig b/test/Kconfig
>>> index 9b2f84b551..8c32fa5cbd 100644
>>> --- a/test/Kconfig
>>> +++ b/test/Kconfig
>>> @@ -42,6 +42,7 @@ endif
>>>
>>> config UT_LOG
>>> 	bool "Unit tests for logging functions"
>>> +	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
>>
>>
>>> 	depends on UNIT_TEST
>>> 	default y
>>> 	help
>>
>>
diff mbox series

Patch

diff --git a/test/Kconfig b/test/Kconfig
index 9b2f84b551..8c32fa5cbd 100644
--- a/test/Kconfig
+++ b/test/Kconfig
@@ -42,6 +42,7 @@  endif
 
 config UT_LOG
 	bool "Unit tests for logging functions"
+	depends on LOG
 	depends on UNIT_TEST
 	default y
 	help