Migrating a Factory Configuration File to Multiple Files
This procedure applies to Workbench 7.1(13) or later.
Before starting, review Multiple Configuration Files.
For a one-time migration of your cfg.factory file to multiple files:
-
Confirm that you are the only developer working on the cfg.factory file in your Measure Factory project.
- Examine the cfg.factory script, to determine the data-set to be extracted.
-
In the project config directory, create a new factory-data-set file.
TIP: DI recommends that you use the naming convention: /config/data-sets/NAME.factory-data-set
- In the cfg.factory file, locate the data-set, and use a copy and paste operation to add the code block into your new factory-data-set file. Be sure to remove the name from the data-set block in the new file, and then save the file.
- In cfg.factory, replace the contents of the data-set block that you copied with a reference to the new file. For example: data-set "NAME" file="data-sets/NAME.factory-data-set"
-
Do one of the following:
Run the factory build to make sure it still works, or
Run spectre measures from the command line using the --dry-run option to look for errors.
- Repeat steps 2–6 for more data-sets until all data sets are extracted.
Continue this process for scopes.
- Examine the cfg.factory script, and determine the scope to be extracted.
-
In the project's config directory, create a new factory-scope file.
TIP: DI recommends that you use the naming convention: /config/scopes/NAME.factory-scope
- In the cfg.factory file, locate the scope that you want to extract, and use a copy and paste operation to add the code block into your new factory-scope file. Be sure to remove the name from the scope block in the new file, and then save the file.
- In cfg.factory, replace the contents of the scope block that you copied with a reference to the new file. For example: scope "NAME" file="scopes/NAME.factory-scope"
-
For each measure in that scope, use a copy and paste operation to add the measure tag into the new factory-scope file, and remove the scope tag from inside the measure.
-
In cfg.factory, remove the contents of those measures, leaving behind only: measure "NAME"
-
Do one of the following:
Run the factory build to make sure it still works, or
Run spectre measures from the command line using the --dry-run option to look for errors.
- Repeat steps 1–7 for other scopes and scoped measures until you have extracted all that you want.