tree: 4bb87a76bf7b42ac34511a363a91d704a2975d46 [path history] [tgz]
  1. expected_idk/
  2. input_fuchsia_dir/
  3. README.md
  4. test_collection.json
build/sdk/generate_prebuild_idk/validation_data/README.md

fuchsia_idk_repository() validation data

This directory contains data that is used to validate the script at //build/sdk/generate_prebuild_idk, which generates an IDK that follows the official IDK layout based on prebuild metadata generated by GN gen.

Directory layout

This directory contains the following:

  • test_collection.json: A fixed and minimal prebuild metadata file similar to that generated by GN gen. Each atom type is included at least once.

  • input_fuchsia_dir/: Files from a fuchsia.git workspace that are used during generation by generate_prebuild_idk or because they are referenced by atoms in test_collection.json. The out/notdefault directory is also required to exist in order for the script to be able to open the relative path ../../sdk/version_history.json.

    Apart from these metadata files, all other files should be symlinks to files that exist in the top-level source_files or ninja_artifacts directories, using relative target paths.

  • expected_idk/: A directory containing the expected (golden) output IDK that the processing script is supposed to generate when parsing the content of input_fuchsia_dir.

Notes about the packages:

  • Packages are normally only built in sub-builds. In the test collection, packages for a NEXT x64 sub-build are included alongside other atoms from a base PLATFORM build.

  • Not all blobs specified in the package manifests are included. The rest will be broken symlinks. Specifically, only two blobs for fake-build-info are included.

  • fake-build-info and intl_property_manager have overlapping blobs, which is an important test case.

Usage

The //build/sdk:generate_prebuild_idk_integration_test target can be built to run, at build time, the validation script, which invokes generate_prebuild_idk to generate a new output IDK, and compare its results with the content of expected_idk.

For debugging, it is possible to invoke the script manually by doing:

python3 build/sdk/generate_prebuild_idk_validation.py \
  --build-dir /tmp/idk_validation