Skip to content

Commit

Permalink
build: fix reasons conflict
Browse files Browse the repository at this point in the history
The "_disable_reason" variables are subject to naming conflicts.

This has been caught while looking at mingw builds where the graph
application was skipped with an <unknown_reason> (which is caused by a
missing reason variable set in app/graph/meson.build) and the graph
library was skipped with the same <unknown_reason> too, even though
this library meson does set a proper reason variable.

Example in GHA:

=================
Content Skipped
=================

apps:
	dumpcap:	not supported on Windows
	graph:	<unknown reason>
	pdump:	not supported on Windows
...

libs:
	acl:	not supported on Windows
	bbdev:	not supported on Windows
...
	graph:	<unknown reason>
	node:	not supported on Windows

Prefix all those variables with the type of component.

Fixes: ecf7518 ("build: list selected applications")
Cc: [email protected]

Signed-off-by: David Marchand <[email protected]>
  • Loading branch information
david-marchand committed Jan 31, 2024
1 parent cf70946 commit 1ad47f1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ foreach app:apps
if not build
if reason != ''
dpdk_apps_disabled += app
set_variable(app.underscorify() + '_disable_reason', reason)
set_variable('app_' + app.underscorify() + '_disable_reason', reason)
endif
continue
endif
Expand Down
10 changes: 5 additions & 5 deletions drivers/common/qat/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ qat_compress_relpath = '../../' + qat_compress_path
if disable_drivers.contains(qat_crypto_path)
qat_crypto = false
dpdk_drvs_disabled += qat_crypto_path
set_variable(qat_crypto_path.underscorify() + '_disable_reason',
set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
'Explicitly disabled via build config')
endif
if disable_drivers.contains(qat_compress_path)
qat_compress = false
dpdk_drvs_disabled += qat_compress_path
set_variable(qat_compress_path.underscorify() + '_disable_reason',
set_variable('drv_' + qat_compress_path.underscorify() + '_disable_reason',
'Explicitly disabled via build config')
endif

Expand All @@ -36,7 +36,7 @@ if arch_subdir == 'arm'
else
qat_crypto = false
dpdk_drvs_disabled += qat_crypto_path
set_variable(qat_crypto_path.underscorify() + '_disable_reason',
set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
'missing dependency for Arm, libcrypto')
endif
else
Expand All @@ -57,7 +57,7 @@ else
else
qat_crypto = false
dpdk_drvs_disabled += qat_crypto_path
set_variable(qat_crypto_path.underscorify() + '_disable_reason',
set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
'missing dependency, libipsecmb or libcrypto')
endif
elif libcrypto.found()
Expand All @@ -66,7 +66,7 @@ else
else
qat_crypto = false
dpdk_drvs_disabled += qat_crypto_path
set_variable(qat_crypto_path.underscorify() + '_disable_reason',
set_variable('drv_' + qat_crypto_path.underscorify() + '_disable_reason',
'missing dependency, libipsecmb or libcrypto')
endif
endif
Expand Down
4 changes: 2 additions & 2 deletions drivers/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ foreach subpath:subdirs
if skip_class
drv_path = join_paths(class, '*')
dpdk_drvs_disabled += drv_path
set_variable(drv_path.underscorify() + '_disable_reason', reason)
set_variable('drv_' + drv_path.underscorify() + '_disable_reason', reason)
continue
endif
endif
Expand Down Expand Up @@ -199,7 +199,7 @@ foreach subpath:subdirs
# component disable printout in those cases
if reason != ''
dpdk_drvs_disabled += drv_path
set_variable(drv_path.underscorify() + '_disable_reason', reason)
set_variable('drv_' + drv_path.underscorify() + '_disable_reason', reason)
endif
continue
endif
Expand Down
2 changes: 1 addition & 1 deletion lib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ foreach l:libraries

if not build
dpdk_libs_disabled += name
set_variable(name.underscorify() + '_disable_reason', reason)
set_variable('lib_' + name.underscorify() + '_disable_reason', reason)
continue
endif

Expand Down
6 changes: 3 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,17 @@ message(output_message + '\n')
output_message = '\n=================\nContent Skipped\n=================\n'
output_message += '\napps:\n\t'
foreach app:dpdk_apps_disabled
reason = get_variable(app.underscorify() + '_disable_reason')
reason = get_variable('app_' + app.underscorify() + '_disable_reason')
output_message += app + ':\t' + reason + '\n\t'
endforeach
output_message += '\nlibs:\n\t'
foreach lib:dpdk_libs_disabled
reason = get_variable(lib.underscorify() + '_disable_reason')
reason = get_variable('lib_' + lib.underscorify() + '_disable_reason')
output_message += lib + ':\t' + reason + '\n\t'
endforeach
output_message += '\ndrivers:\n\t'
foreach drv:dpdk_drvs_disabled
reason = get_variable(drv.underscorify() + '_disable_reason')
reason = get_variable('drv_' + drv.underscorify() + '_disable_reason')
output_message += drv + ':\t' + reason + '\n\t'
endforeach
message(output_message + '\n')

0 comments on commit 1ad47f1

Please sign in to comment.