Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor doc test and justfile #2330

Merged
merged 4 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Add the permission to run
run: chmod +x ./youki
- name: Run integration tests
run: just oci-tests
run: just test-oci

oci-validation-rust:
runs-on: ubuntu-22.04
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ jobs:
- name: Install requirements
run: sudo env PATH=$PATH just ci-prepare
- name: Run tests
run: |
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cd ./crates && cargo test --all --all-features --no-fail-fast
run: just test-basic
- name: Run feature tests
run: just test-features

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
run: just youki-release
- name: test
# TODO(utam0k): The feature test needs nightly
# run: just unittest featuretest oci-tests
run: just unittest oci-tests
# run: just test-basic featuretest test-oci
run: just test-basic test-oci

upload:
name: Upload
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Go and node-tap are required to run integration tests. See the [opencontainers/r

```bash
git submodule update --init --recursive
just oci-tests
just test-oci
```

### Setting up Vagrant
Expand Down
24 changes: 15 additions & 9 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ rust-oci-tests-bin:

# Tests

# run oci tests
test-oci: oci-tests rust-oci-tests
# run integration tests
test-integration: test-oci rust-oci-tests

# run all tests except rust-oci
test-all: unittest test-features oci-tests containerd-test # currently not doing rust-oci here
test-all: test-basic test-features test-oci containerd-test # currently not doing rust-oci here

# run cargo unittests
unittest:
cd ./crates
LD_LIBRARY_PATH=${HOME}/.wasmedge/lib cargo test --all --all-targets --all-features
# run basic tests
test-basic: test-unit test-doc

# run cargo unit tests
test-unit:
LD_LIBRARY_PATH=${HOME}/.wasmedge/lib cargo test --lib --bins --all --all-targets --all-features --no-fail-fast

# run cargo doc tests
test-doc:
cargo test --doc

# run permutated feature compilation tests
test-features:
Expand All @@ -47,8 +53,8 @@ test-features:
test-musl:
{{ cwd }}/scripts/musl_test.sh

# run oci integration tests
oci-tests:
# run oci integration tests through runtime-tools
test-oci:
{{ cwd }}/scripts/oci_integration_tests.sh {{ cwd }}

# run rust oci integration tests
Expand Down