forked from platformio/platformio-core
Parse only $PROJECT_HASH legacy built-in variable
This commit is contained in:
1 parent
0f554d2f31
commit
204a60dd52
2 files changed
+6
-6
No files matched your search
@@ -354,10 +354,7 @@ def test_get_value(config):
|
||||
"--help",
|
||||
]
|
||||
# test relative dir
|
||||
assert config.get("platformio", "src_dir") == os.path.abspath(
|
||||
os.path.join(os.getcwd(), "source")
|
||||
)
|
||||
|
||||
assert config.get("platformio", "src_dir") == "source"
|
||||
# renamed option
|
||||
assert config.get("env:extra_1", "lib_install") == ["574"]
|
||||
assert config.get("env:extra_1", "lib_deps") == ["574"]
|
||||
@@ -654,6 +651,7 @@ def test_nested_interpolation(tmp_path: Path):
|
||||
"""
|
||||
[platformio]
|
||||
build_dir = /tmp/pio-$PROJECT_HASH
|
||||
data_dir = $PROJECT_DIR/assets
|
||||
|
||||
[env:myenv]
|
||||
build_flags = -D UTIME=${UNIX_TIME}
|
||||
@@ -667,9 +665,10 @@ test_testing_command =
|
||||
"""
|
||||
)
|
||||
config = ProjectConfig(str(project_conf))
|
||||
assert config.get("platformio", "data_dir") == "$PROJECT_DIR/assets"
|
||||
assert config.get("env:myenv", "build_flags")[0][-10:].isdigit()
|
||||
testing_command = config.get("env:myenv", "test_testing_command")
|
||||
assert "$" not in " ".join(testing_command)
|
||||
assert config.get("env:myenv", "build_flags")[0][-10:].isdigit()
|
||||
|
||||
|
||||
def test_extends_order(tmp_path: Path):
|
||||
|
||||
Reference in new issue
Block a user