Browse Source

Fix wiggle's tests

pull/1278/head
Jakub Konka 5 years ago
parent
commit
7bcbf40f1d
  1. 270
      Cargo.lock
  2. 1
      Cargo.toml
  3. 61
      crates/wiggle/.github/workflows/main.yml
  4. 4
      crates/wiggle/.gitignore
  5. 8
      crates/wiggle/Cargo.toml
  6. 1
      crates/wiggle/crates/generate/.gitignore
  7. 12
      crates/wiggle/crates/generate/src/config.rs
  8. 2
      crates/wiggle/crates/runtime/.gitignore
  9. 2
      crates/wiggle/crates/test/.gitignore

270
Cargo.lock

@ -167,6 +167,21 @@ dependencies = [
"which",
]
[[package]]
name = "bit-set"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80"
dependencies = [
"bit-vec",
]
[[package]]
name = "bit-vec"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb"
[[package]]
name = "bitflags"
version = "1.2.1"
@ -317,6 +332,15 @@ dependencies = [
"winapi",
]
[[package]]
name = "cloudabi"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
dependencies = [
"bitflags",
]
[[package]]
name = "cmake"
version = "0.1.42"
@ -908,6 +932,18 @@ dependencies = [
"miniz_oxide",
]
[[package]]
name = "fnv"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
[[package]]
name = "fuchsia-cprng"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
[[package]]
name = "gcc"
version = "0.3.55"
@ -1480,6 +1516,26 @@ dependencies = [
"unicode-xid",
]
[[package]]
name = "proptest"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf6147d103a7c9d7598f4105cf049b15c99e2ecd93179bf024f0fd349be5ada4"
dependencies = [
"bit-set",
"bitflags",
"byteorder",
"lazy_static",
"num-traits",
"quick-error",
"rand 0.6.5",
"rand_chacha 0.1.1",
"rand_xorshift",
"regex-syntax",
"rusty-fork",
"tempfile",
]
[[package]]
name = "pyo3"
version = "0.8.5"
@ -1538,8 +1594,8 @@ checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f"
dependencies = [
"env_logger 0.7.1",
"log",
"rand",
"rand_core",
"rand 0.7.3",
"rand_core 0.5.1",
]
[[package]]
@ -1551,6 +1607,25 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
dependencies = [
"autocfg 0.1.7",
"libc",
"rand_chacha 0.1.1",
"rand_core 0.4.2",
"rand_hc 0.1.0",
"rand_isaac",
"rand_jitter",
"rand_os",
"rand_pcg 0.1.2",
"rand_xorshift",
"winapi",
]
[[package]]
name = "rand"
version = "0.7.3"
@ -1559,10 +1634,20 @@ checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom",
"libc",
"rand_chacha",
"rand_core",
"rand_hc",
"rand_pcg",
"rand_chacha 0.2.1",
"rand_core 0.5.1",
"rand_hc 0.2.0",
"rand_pcg 0.2.1",
]
[[package]]
name = "rand_chacha"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
dependencies = [
"autocfg 0.1.7",
"rand_core 0.3.1",
]
[[package]]
@ -1572,9 +1657,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
dependencies = [
"c2-chacha",
"rand_core",
"rand_core 0.5.1",
]
[[package]]
name = "rand_core"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
dependencies = [
"rand_core 0.4.2",
]
[[package]]
name = "rand_core"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
[[package]]
name = "rand_core"
version = "0.5.1"
@ -1584,13 +1684,66 @@ dependencies = [
"getrandom",
]
[[package]]
name = "rand_hc"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
dependencies = [
"rand_core 0.3.1",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
dependencies = [
"rand_core",
"rand_core 0.5.1",
]
[[package]]
name = "rand_isaac"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
dependencies = [
"rand_core 0.3.1",
]
[[package]]
name = "rand_jitter"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
dependencies = [
"libc",
"rand_core 0.4.2",
"winapi",
]
[[package]]
name = "rand_os"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
dependencies = [
"cloudabi",
"fuchsia-cprng",
"libc",
"rand_core 0.4.2",
"rdrand",
"winapi",
]
[[package]]
name = "rand_pcg"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
dependencies = [
"autocfg 0.1.7",
"rand_core 0.4.2",
]
[[package]]
@ -1599,7 +1752,16 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
dependencies = [
"rand_core",
"rand_core 0.5.1",
]
[[package]]
name = "rand_xorshift"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
dependencies = [
"rand_core 0.3.1",
]
[[package]]
@ -1637,6 +1799,15 @@ dependencies = [
"num_cpus",
]
[[package]]
name = "rdrand"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
dependencies = [
"rand_core 0.3.1",
]
[[package]]
name = "redox_syscall"
version = "0.1.56"
@ -1737,6 +1908,18 @@ dependencies = [
"syn",
]
[[package]]
name = "rusty-fork"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dd93264e10c577503e926bd1430193eeb5d21b059148910082245309b424fae"
dependencies = [
"fnv",
"quick-error",
"tempfile",
"wait-timeout",
]
[[package]]
name = "ryu"
version = "1.0.2"
@ -1947,7 +2130,7 @@ checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
dependencies = [
"cfg-if",
"libc",
"rand",
"rand 0.7.3",
"redox_syscall",
"remove_dir_all",
"winapi",
@ -2133,6 +2316,15 @@ version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce"
[[package]]
name = "wait-timeout"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
dependencies = [
"libc",
]
[[package]]
name = "walkdir"
version = "2.3.1"
@ -2332,7 +2524,7 @@ dependencies = [
"log",
"more-asserts",
"pretty_env_logger",
"rand",
"rand 0.7.3",
"rayon",
"serde",
"sha2",
@ -2543,7 +2735,47 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"witx",
"witx 0.8.3",
]
[[package]]
name = "wiggle"
version = "0.1.0"
dependencies = [
"proptest",
"syn",
"wiggle-generate",
"wiggle-runtime",
"wiggle-test",
"witx 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wiggle-generate"
version = "0.1.0"
dependencies = [
"anyhow",
"heck",
"proc-macro2",
"quote",
"syn",
"wiggle-runtime",
"witx 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wiggle-runtime"
version = "0.1.0"
dependencies = [
"thiserror",
]
[[package]]
name = "wiggle-test"
version = "0.1.0"
dependencies = [
"proptest",
"wiggle-runtime",
]
[[package]]
@ -2599,6 +2831,20 @@ dependencies = [
"wast",
]
[[package]]
name = "witx"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f30f6e46362ed8a64e6b4ff8b7a63006462933a8100c19df39caa333e35ed95"
dependencies = [
"anyhow",
"log",
"pretty_env_logger",
"structopt",
"thiserror",
"wast",
]
[[package]]
name = "yanix"
version = "0.12.0"

1
Cargo.toml

@ -68,6 +68,7 @@ members = [
"crates/misc/py",
"crates/c-api",
"fuzz",
"crates/wiggle",
]
[features]

61
crates/wiggle/.github/workflows/main.yml

@ -1,61 +0,0 @@
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
run: |
rustup update stable
rustup default stable
rustup component add rustfmt
- name: Cargo fmt
run: cargo fmt --all -- --check
build:
name: Build
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
shell: bash
run: |
rustup update stable
rustup default stable
- name: Build
run: cargo build --all --release -vv
test:
name: Test
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
shell: bash
run: |
rustup update stable
rustup default stable
- name: Test
run: cargo test --all

4
crates/wiggle/.gitignore

@ -1,4 +0,0 @@
/target
**/*.rs.bk
Cargo.lock
proptest-regressions

8
crates/wiggle/Cargo.toml

@ -16,11 +16,3 @@ syn = { version = "1.0", features = ["full"] }
wiggle-runtime = { path = "crates/runtime" }
wiggle-test = { path = "crates/test" }
proptest = "0.9"
[workspace]
members = [
"crates/generate",
"crates/runtime",
"crates/test",
]
exclude = ["crates/WASI"]

1
crates/wiggle/crates/generate/.gitignore

@ -1 +0,0 @@
target

12
crates/wiggle/crates/generate/src/config.rs

@ -85,7 +85,17 @@ impl Parse for WitxConf {
let path_lits: Punctuated<LitStr, Token![,]> = content.parse_terminated(Parse::parse)?;
let paths: Vec<PathBuf> = path_lits
.iter()
.map(|lit| PathBuf::from(lit.value()))
.map(|lit| {
let p = PathBuf::from(lit.value());
if p.is_absolute() {
p
} else {
let mut root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
root.pop();
root.pop();
root.join(p)
}
})
.collect();
Ok(WitxConf { paths })
}

2
crates/wiggle/crates/runtime/.gitignore

@ -1,2 +0,0 @@
target
Cargo.lock

2
crates/wiggle/crates/test/.gitignore

@ -1,2 +0,0 @@
target
Cargo.lock
Loading…
Cancel
Save