Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sw/tests] Adding Meson infrastructure for integration of closed and …
…open source chip level testing. Adding one flag called closed_source_dir to Meson options file. Added closed_source dir under sw/device/tests. Added weak hook functions in ottf.c file. Added example test called closed_entropy_src_smoketest that can overwritten the weak functions in ottf.c file with closed source code found under closed_source_dir path. Fixes #10852 Signed-off-by: Maayan Kashani <maayan.kashani@nuvoton.com>
- Loading branch information
1 parent
cb8755c
commit e1548e4
Showing
4 changed files
with
86 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,9 @@ option( | |
type: 'boolean', | ||
value: false, | ||
) | ||
|
||
option( | ||
'closed_source_dir', | ||
type: 'string', | ||
value: '', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright lowRISC contributors. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# All build targets below will be built in closed source environment only. | ||
# In order to build these targets, 'build_closed_source' and 'closed_source_dir' | ||
# build flags should be defined. | ||
|
||
closed_source_dir = get_option('closed_source_dir') | ||
closed_source_test_path = 'sw/device/tests/' | ||
|
||
hookfile = join_paths(closed_source_dir , closed_source_test_path, \ | ||
'ip_config_hooks.c') | ||
|
||
############################################################################### | ||
# Closed source test libraries. | ||
############################################################################### | ||
closed_source_config_hooks_lib = static_library( | ||
'closed_source_config_hooks_lib', | ||
sources: [hookfile], | ||
dependencies: [ | ||
sw_lib_runtime_log, | ||
], | ||
) | ||
closed_source_config_hooks_dep = declare_dependency( | ||
link_with: closed_source_config_hooks_lib, | ||
) | ||
|
||
############################################################################### | ||
# Closed source test. | ||
############################################################################### | ||
sw_tests += { | ||
'closed_entropy_src_smoketest': { | ||
'library': entropy_src_smoketest_lib, | ||
'link_with_closed_configs': true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters