# # This script runs the full set of tests for product config: # 1. Build the product-config tool. # 2. Run the unit tests. # 3. Run the product config for every product available in the current # source tree, for each of user, userdebug and eng. # - To restrict which products or variants are run, set the # PRODUCTS or VARIANTS environment variables. # - Products for which the make based product config fails are # skipped. #
# The PRODUCTS variable is used by the build, and setting it in the environment # interferes with that, so unset it. (That should probably be fixed)
products=$PRODUCTS
variants=$VARIANTS
unset PRODUCTS
unset VARIANTS
# Don't use lunch from the user's shell
unset TARGET_PRODUCT
unset TARGET_BUILD_VARIANT
failed_baseline_checks= for product in $products ; do for variant in $variants ; do echo echo"Checking: lunch $product-$variant"
TARGET_PRODUCT=$product \
TARGET_BUILD_VARIANT=$variant \
build/soong/soong_ui.bash --dumpvar-mode TARGET_PRODUCT &> /dev/null
exit_status=$?
if_signal_exit $exit_status if [ $exit_status -ne 0 ] ; then echo"*** Combo fails with make, skipping product-config test run for $product-$variant" else rm -rf out/config/$product-$variant
TARGET_PRODUCT=$product TARGET_BUILD_VARIANT=$variant product-config \
--ckati_bin $CKATI_BIN \
--error 1000
exit_status=$?
if_signal_exit $exit_status if [ $exit_status -ne 0 ] ; then
failed_baseline_checks="$failed_baseline_checks $product-$variant" fi if [ "$CHECK_FOR_RULES" != "" ] ; then # This is a little bit of sleight of hand for good output formatting at the # expense of speed. We've already run the command once without # ALLOW_RULES_IN_PRODUCT_CONFIG, so we know it passes there. We run it again # with ALLOW_RULES_IN_PRODUCT_CONFIG=error to see if it fails, but that will # cause it to only print the first error. But we want to see all of them, # so if it fails we run it a third time with ALLOW_RULES_IN_PRODUCT_CONFIG=warning, # so we can see all the warnings.
TARGET_PRODUCT=$product \
TARGET_BUILD_VARIANT=$variant \
ALLOW_RULES_IN_PRODUCT_CONFIG=error \
build/soong/soong_ui.bash --dumpvar-mode TARGET_PRODUCT &> /dev/null
exit_status=$?
if_signal_exit $exit_status if [ $exit_status -ne 0 ] ; then
TARGET_PRODUCT=$product \
TARGET_BUILD_VARIANT=$variant \
ALLOW_RULES_IN_PRODUCT_CONFIG=warning \
build/soong/soong_ui.bash --dumpvar-mode TARGET_PRODUCT > /dev/null
failed_rule_checks="$failed_rule_checks $product-$variant" fi fi fi done done
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.