debian: adapt the XML scanning logic to the new layout #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ACRN's next-gen configurator takes a path to users "work folder" and
generates all files (including the board XML and the scenario XML) of a
scenario under that folder. As a result, users maintaining multiple
scenarios for multiple boards are recommended to organize their config
files using the following layout. Note that the board and scenario XMLs
will have unified names, and the name of the folder is used as the name of
the scenario.
.
├── cfl-k700-i7
│ ├── hybrid_launch_2user_vm
│ │ ├── board.xml
│ │ └── scenario.xml
│ ├── hybrid_rt
│ │ ├── board.xml
│ │ └── scenario.xml
│ ├── partitioned
│ │ ...
│ └── shared_launch_6user_vm
│ ...
├── generic_board
│ ├── hybrid_launch_2user_vm
│ │ ├── board.xml
│ │ └── scenario.xml
│ ├── hybrid_rt
│ | ...
│ ├── ...
├── nuc11tnbi5
│ ├── ...
└── ...
This patch adjusts the XML scanning logic (namely the
get-xml-data
macro)in debian/rules so that it can scan BOTH the current layout AND the
recommended one above. Some recent changes are also taken into
consideration:
Scenario XMLs no longer have the
board
andscenario
attribute atits root node. The new scanning logic infers as follows.
If a scenario XML contains a
board
attribute, it will be used. Otherwiseother XML files under the same directory will be scanned for that
board
attribute and the first found will be used, assuming new scenario XMLs for
different boards are not placed under the same directory.
The scenario name is the file name (without the .xml suffix) if it is not
"scenario". Otherwise the work folder name will be used.
Symbolic links are ignored to avoid duplicate builds.
Launch XMLs are now merged into scenario XMLs. So it is no longer
necessary to distinguish scenario XMLs from launch ones.
Signed-off-by: Junjie Mao [email protected]