@Test
    public void deriveAndExport() throws IOException, ParseException {
        var dirPath = System.getProperty("schema.exporter.path");
        // The test is marked as skipped if this is not true.
        assumeTrue(dirPath != null);

        var props = new TestProperties();
        var logger = new TestableDeployLogger();
        var builder = ApplicationBuilder.createFromDirectory(dirPath, new MockFileRegistry(), logger, props);
        var derived = new DerivedConfiguration(
                new DeployState.Builder().properties(props)
                        .deployLogger(logger)
                        .rankProfileRegistry(builder.getRankProfileRegistry())
                        .queryProfiles(builder.getQueryProfileRegistry())
                        .build(),
                builder.getSchema(null), SchemaInfo.IndexMode.INDEX);
        exportConfig(dirPath, derived, builder);
    }
Utility class for deriving backend configs for a given schema and exporting them to a set of files.

This can be used by e.g C++ unit tests to generate configs that are checked in as part of the test.
Place the schema file in a directory $HOME/mydir and run the following in $HOME/git/vespa:
  mvn test -Dtest=SchemaToDerivedConfigExporter -Dschema.exporter.path=$HOME/mydir -pl config-model

Note that the directory path must be absolute.

@author geirst
config-model/src/test/java/com/yahoo/schema/derived/SchemaToDerivedConfigExporter.java