diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:48:42 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:48:42 +0000 |
commit | 8b507065ed893dda665cc2ae539039e8917aea11 (patch) | |
tree | 76faf56f2374988d3b7f671e7f63ebb7cd6c9b3e | |
parent | 6801fafe367c646454f0e101e5d0e06f3e376acc (diff) | |
parent | b5b6d1edff0ebdd955df2a2414375a57f19933fa (diff) | |
download | cexpr-android14-mainline-conscrypt-release.tar.gz |
Snap for 10453563 from b5b6d1edff0ebdd955df2a2414375a57f19933fa to mainline-conscrypt-releaseaml_con_341614000aml_con_341511080aml_con_341410300aml_con_341310090aml_con_341110000android14-mainline-conscrypt-release
Change-Id: I0012a2736576d5c52f02fa31f773ea486627d1d0
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 31 | ||||
-rw-r--r-- | .travis.yml | 18 | ||||
-rw-r--r-- | Android.bp | 8 | ||||
-rw-r--r-- | Cargo.toml | 11 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | TEST_MAPPING | 14 | ||||
-rw-r--r-- | patches/nom7.patch | 84 |
9 files changed, 52 insertions, 128 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 8481d95..72d29e1 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "6a43efb32cf14b8dc4cd294429d3de259d37e279" + "sha1": "c7ccdfbc37b508cfda1171ab4f89afaeb72e82f3" } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8af3b70 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI +on: + push: + branches: + - master + pull_request: + branches: + - master + + +jobs: + build_and_test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install LLVM and Clang + uses: KyleMayes/install-llvm-action@v1 + with: + version: "11.0" + directory: ${{ runner.temp }}/llvm-11.0 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose --all diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3c39e22..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -branches: - only: - # This is where pull requests from "bors r+" are built. - - staging - # This is where pull requests from "bors try" are built. - - trying - # Not really necessary, just to get a green badge on “master” - - master -language: rust -dist: xenial -addons: - apt: - packages: - - libclang-dev -env: - - RUST_BACKTRACE=1 LLVM_CONFIG_PATH=llvm-3.8-config -script: - - cargo test --verbose --all @@ -42,10 +42,16 @@ rust_library { host_supported: true, crate_name: "cexpr", cargo_env_compat: true, - cargo_pkg_version: "0.5.0", + cargo_pkg_version: "0.6.0", srcs: ["src/lib.rs"], edition: "2018", rustlibs: [ "libnom", ], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], + product_available: true, + vendor_available: true, } @@ -3,17 +3,16 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "cexpr" -version = "0.5.0" +version = "0.6.0" authors = ["Jethro Beekman <jethro@jbeekman.nl>"] description = "A C expression parser and evaluator" documentation = "https://docs.rs/cexpr/" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index acbe572..6de1e89 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "cexpr" -version = "0.5.0" +version = "0.6.0" edition = "2018" authors = ["Jethro Beekman <jethro@jbeekman.nl>"] license = "Apache-2.0/MIT" @@ -13,7 +13,7 @@ keywords = ["C","expression","parser"] travis-ci = { repository = "jethrogb/rust-cexpr" } [dependencies] -nom = { version = "6", default-features = false, features = ["std"] } +nom = { version = "7", default-features = false, features = ["std"] } [dev-dependencies] clang-sys = ">= 0.13.0, < 0.29.0" @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/cexpr/cexpr-0.5.0.crate" + value: "https://static.crates.io/crates/cexpr/cexpr-0.6.0.crate" } - version: "0.5.0" + version: "0.6.0" license_type: NOTICE last_upgrade_date { - year: 2021 + year: 2022 month: 6 - day: 21 + day: 27 } } diff --git a/TEST_MAPPING b/TEST_MAPPING index e4ec3b3..23bbdf9 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -3,22 +3,12 @@ "imports": [ { "path": "external/rust/crates/libsqlite3-sys" - } - ], - "presubmit": [ - { - "name": "keystore2_test" }, { - "name": "legacykeystore_test" - } - ], - "presubmit-rust": [ - { - "name": "keystore2_test" + "path": "system/security/keystore2" }, { - "name": "legacykeystore_test" + "path": "system/security/keystore2/legacykeystore" } ] } diff --git a/patches/nom7.patch b/patches/nom7.patch deleted file mode 100644 index 5ba703d..0000000 --- a/patches/nom7.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/Cargo.toml b/Cargo.toml -index 8f6dcc2..a3067d0 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -21,7 +21,7 @@ keywords = ["C", "expression", "parser"] - license = "Apache-2.0/MIT" - repository = "https://github.com/jethrogb/rust-cexpr" - [dependencies.nom] --version = "6" -+version = "7" - features = ["std"] - default-features = false - [dev-dependencies.clang-sys] -diff --git a/src/expr.rs b/src/expr.rs -index 5dce3c7..7f7e458 100644 ---- a/src/expr.rs -+++ b/src/expr.rs -@@ -308,7 +308,7 @@ impl<'a> PRef<'a> { - pair(complete(one_of_punctuation(&["*", "/", "%"][..])), |i| { - self.unary(i) - }), -- acc, -+ move || acc.clone(), - |mut acc, (op, val): (&[u8], EvalResult)| { - match op[0] as char { - '*' => acc *= &val, -@@ -327,7 +327,7 @@ impl<'a> PRef<'a> { - pair(complete(one_of_punctuation(&["+", "-"][..])), |i| { - self.mul_div_rem(i) - }), -- acc, -+ move || acc.clone(), - |mut acc, (op, val): (&[u8], EvalResult)| { - match op[0] as char { - '+' => acc += &val, -@@ -345,7 +345,7 @@ impl<'a> PRef<'a> { - pair(complete(one_of_punctuation(&["<<", ">>"][..])), |i| { - self.add_sub(i) - }), -- acc, -+ move || acc.clone(), - |mut acc, (op, val): (&[u8], EvalResult)| { - match op { - b"<<" => acc <<= &val, -@@ -361,7 +361,7 @@ impl<'a> PRef<'a> { - let (input, acc) = self.shl_shr(input)?; - numeric(fold_many0( - preceded(complete(p("&")), |i| self.shl_shr(i)), -- acc, -+ move || acc.clone(), - |mut acc, val: EvalResult| { - acc &= &val; - acc -@@ -373,7 +373,7 @@ impl<'a> PRef<'a> { - let (input, acc) = self.and(input)?; - numeric(fold_many0( - preceded(complete(p("^")), |i| self.and(i)), -- acc, -+ move || acc.clone(), - |mut acc, val: EvalResult| { - acc ^= &val; - acc -@@ -385,7 +385,7 @@ impl<'a> PRef<'a> { - let (input, acc) = self.xor(input)?; - numeric(fold_many0( - preceded(complete(p("|")), |i| self.xor(i)), -- acc, -+ move || acc.clone(), - |mut acc, val: EvalResult| { - acc |= &val; - acc -diff --git a/src/literal.rs b/src/literal.rs -index b74699f..68e85c7 100644 ---- a/src/literal.rs -+++ b/src/literal.rs -@@ -224,7 +224,7 @@ fn c_string(i: &[u8]) -> nom::IResult<&[u8], Vec<u8>> { - map(escaped_char, |c: CChar| c.into()), - map(is_not([b'\\', b'"']), |c: &[u8]| c.into()), - )), -- Vec::new(), -+ Vec::new, - |mut v: Vec<u8>, res: Vec<u8>| { - v.extend_from_slice(&res); - v |