diff options
author | Liz Kammer <eakammer@google.com> | 2022-02-01 22:43:50 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-02-01 22:43:50 +0000 |
commit | 63686df8cf3fdf7d766695f55876a4968c2e74cd (patch) | |
tree | 18bac194ca18614e98db4344514ad50c66a3a9de | |
parent | e9522a5d0dcb81ea729cb5149d5435664f02963d (diff) | |
parent | 89c4954bc69596d8092b49c4e85149c2c47c8989 (diff) | |
download | libxml2-android-s-qpr3-beta-1.tar.gz |
Merge "Refactor genrules to explicitly list inputs"android-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-beta-3android-s-qpr3-beta-1android-t-preview-1android-s-v2-beta-3android-s-qpr3-beta-1
-rw-r--r-- | Android.bp | 74 |
1 files changed, 28 insertions, 46 deletions
@@ -242,18 +242,14 @@ genrule { name: "libxml2_schema_fuzz_corpus", tools: ["libxml2_genseed"], srcs: [ - "test/schemas", + "test/schemas/*.xsd", ], // The genseed tool only writes under its current directory. - // Soong does not run the tool from within the jail, so - // the shell must first 'cd' to the right path. However, - // then the location of the tool is lost, as $(location) gives - // a relative path. - cmd: "mkdir -p $(genDir)/fuzz/seed/schema && " + - "TOP_DIR=$$(pwd) && " + - "cd $(genDir)/fuzz && " + - "$${TOP_DIR}/$(location libxml2_genseed) schema " + - "$${TOP_DIR}/$(location test/schemas)/*.xsd", + // We move outputs to the correct location after generation.. + cmd: "mkdir -p seed/schema && " + + "$(location libxml2_genseed) schema $(in) && " + + "mkdir -p $(genDir)/fuzz/seed/schema && " + + "mv -f seed/schema/* $(genDir)/fuzz/seed/schema", out: [ "fuzz/seed/schema/570702_0.xsd", "fuzz/seed/schema/579746_0.xsd", @@ -437,34 +433,22 @@ genrule { name: "libxml2_xml_fuzz_corpus", tools: ["libxml2_genseed"], srcs: [ - "test", - "test/errors", - "test/errors10", - "test/namespaces", - "test/valid", - "test/VC", - "test/VCM", - "test/XInclude/docs", - "test/xmlid", + "test/*", + "test/errors/*.xml", + "test/errors10/*.xml", + "test/namespaces/*", + "test/valid/*.xml", + "test/VC/*", + "test/VCM/*", + "test/XInclude/docs/*", + "test/xmlid/*", ], // The genseed tool only writes under its current directory. - // Soong does not run the tool from within the jail, so - // the shell must first 'cd' to the right path. However, - // then the location of the tool is lost, as $(location) gives - // a relative path. - cmd: "mkdir -p $(genDir)/fuzz/seed/xml && " + - "TOP_DIR=$$(pwd) && " + - "cd $(genDir)/fuzz && " + - "$${TOP_DIR}/$(location libxml2_genseed) xml " + - "$${TOP_DIR}/$(location test)/* " + - "$${TOP_DIR}/$(location test/errors)/*.xml " + - "$${TOP_DIR}/$(location test/errors10)/*.xml " + - "$${TOP_DIR}/$(location test/namespaces)/* " + - "$${TOP_DIR}/$(location test/valid)/*.xml " + - "$${TOP_DIR}/$(location test/VC)/* " + - "$${TOP_DIR}/$(location test/VCM)/* " + - "$${TOP_DIR}/$(location test/XInclude/docs)/* " + - "$${TOP_DIR}/$(location test/xmlid)/*", + // We move outputs to the correct location after generation.. + cmd: "mkdir -p seed/xml && " + + "$(location libxml2_genseed) xml $(in) &&" + + "mkdir -p $(genDir)/fuzz/seed/xml && " + + "mv seed/xml/* $(genDir)/fuzz/seed/xml", out: [ "fuzz/seed/xml/127772.xml", "fuzz/seed/xml/21.xml", @@ -734,18 +718,16 @@ genrule { name: "libxml2_xpath_fuzz_corpus", tools: ["libxml2_genseed"], srcs: [ - "test/XPath", + "test/XPath/*/*", ], // The genseed tool only writes under its current directory. - // Soong does not run the tool from within the jail, so - // the shell must first 'cd' to the right path. However, - // then the location of the tool is lost, as $(location) gives - // a relative path. - cmd: "mkdir -p $(genDir)/fuzz/seed/xpath && " + - "TOP_DIR=$$(pwd) && " + - "cd $(genDir)/fuzz && " + - "$${TOP_DIR}/$(location libxml2_genseed) xpath " + - "$${TOP_DIR}/$(location test/XPath)", + // We move outputs to the correct location after generation.. + cmd: "inputs=( $(in) ) && " + + "inputDir=$$(dirname $$(dirname $${inputs})) && " + + "mkdir -p seed/xpath && " + + "$(location libxml2_genseed) xpath $${inputDir} && " + + "mkdir -p $(genDir)/fuzz/seed/xpath && " + + "mv seed/xpath/* $(genDir)/fuzz/seed/xpath", out: [ "fuzz/seed/xpath/chapters-1", "fuzz/seed/xpath/chapters-10", |