Fix wiggle's tests

This commit is contained in:
Jakub Konka
2020-03-11 10:40:23 +01:00
parent ae0a0240ed
commit 7bcbf40f1d
9 changed files with 270 additions and 91 deletions

View File

@@ -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

View File

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

View File

@@ -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"]

View File

@@ -1 +0,0 @@
target

View File

@@ -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 })
}

View File

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

View File

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