forked from ulfalizer/Kconfiglib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd30ee8
commit 4e8e109
Showing
4 changed files
with
37 additions
and
0 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
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,2 @@ | ||
FOO = y | ||
BAR = y |
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 @@ | ||
[kconfig_import("config.py") for _ in range(100)] |
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,33 @@ | ||
import os | ||
import glob | ||
import kconfiglib | ||
import pytest | ||
|
||
CUR_DIR = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
|
||
def test_bench_config(benchmark): | ||
kconfig_path = CUR_DIR + '/Kconfig' | ||
|
||
kconf = kconfiglib.Kconfig(kconfig_path) | ||
benchmark(kconf.load_config, filename=CUR_DIR + '/app.config') | ||
|
||
|
||
def test_bench_configpy(benchmark): | ||
kconfig_path = CUR_DIR + '/Kconfig' | ||
|
||
kconf = kconfiglib.Kconfig(kconfig_path) | ||
benchmark(kconf.load_config, filename=CUR_DIR + '/config.py') | ||
|
||
|
||
def test_bench_import_configpy(benchmark): | ||
kconfig_path = CUR_DIR + '/Kconfig' | ||
|
||
kconf = kconfiglib.Kconfig(kconfig_path) | ||
benchmark(kconf.load_config, filename=CUR_DIR + '/config.import.py') | ||
|
||
def test_bench_import100_configpy(benchmark): | ||
kconfig_path = CUR_DIR + '/Kconfig' | ||
|
||
kconf = kconfiglib.Kconfig(kconfig_path) | ||
benchmark(kconf.load_config, filename=CUR_DIR + '/config.import100.py') |