-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packaged build artifacts into artifacts directory
Currently, `fprime-util install` installs files into a variety of different locations, which makes it difficult to archive all the build artifacts. Now, `fprime-util install` has been removed and `fprime-util build` automatically ensures all build artifacts are installed into the location provided by the `install_dest` settings option, which defaults to `build-artifacts`. It has the following structure: - <PLATFORM>/bin: deployment binaries - <PLATFORM>/lib/static: deployment static libraries - <PLATFORM>/dict: command dictionary, autogenerated html command, channel, and event documentation The GDS has also been updated to automatically use the settings.ini file to look into the artifacts directory to find the deployment application and dictionary.
- Loading branch information
1 parent
2f0880c
commit 20b5f29
Showing
27 changed files
with
397 additions
and
236 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
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
2 changes: 2 additions & 0 deletions
2
Fw/Python/test/fprime/fbuild/settings-data/settings-custom-install.ini
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 @@ | ||
[fprime] | ||
install_dest: ../test |
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 @@ | ||
[fprime] |
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,66 @@ | ||
""" | ||
(test) fprime.fbuild.settings: | ||
Tests the F prime settings module. | ||
@author joshuaa | ||
""" | ||
|
||
import pytest | ||
import os | ||
from pathlib import Path | ||
|
||
from fprime.fbuild.settings import IniSettings | ||
|
||
|
||
def full_path(path): | ||
path = Path(__file__).parent / Path(path) | ||
return path.resolve() | ||
|
||
|
||
def test_settings(): | ||
test_cases = [ | ||
{ | ||
"file": "nonexistant.ini", | ||
"expected": { | ||
"framework_path": full_path("../../../../.."), | ||
"install_dest": full_path("settings-data/build-artifacts"), | ||
}, | ||
}, | ||
{ | ||
"file": "settings-empty.ini", | ||
"expected": { | ||
"settings_file": full_path("settings-data/settings-empty.ini"), | ||
"default_toolchain": "native", | ||
"framework_path": full_path("../../../../.."), | ||
"install_dest": full_path("settings-data/build-artifacts"), | ||
"library_locations": [], | ||
"environment_file": full_path("settings-data/settings-empty.ini"), | ||
"environment": {}, | ||
}, | ||
}, | ||
{ | ||
"file": "settings-custom-install.ini", | ||
"expected": { | ||
"settings_file": full_path("settings-data/settings-custom-install.ini"), | ||
"default_toolchain": "native", | ||
"framework_path": full_path("../../../../.."), | ||
"install_dest": full_path("test"), | ||
"library_locations": [], | ||
"environment_file": full_path( | ||
"settings-data/settings-custom-install.ini" | ||
), | ||
"environment": {}, | ||
}, | ||
}, | ||
] | ||
|
||
# Setting chdir so that test is unaffected from working directory pytest is run from | ||
os.chdir(full_path(".")) | ||
|
||
for case in test_cases: | ||
fp = full_path("settings-data/" + case["file"]) | ||
print(fp) | ||
results = IniSettings.load(fp) | ||
assert case["expected"] == results, "{}: Expected {}, got {}".format( | ||
fp, case["expected"], results | ||
) |
Oops, something went wrong.