Skip to content

Commit

Permalink
chore: revert moving tests out of workspace
Browse files Browse the repository at this point in the history
This seems to be too much work for little gain, as a lot of current test infrastructure
relies on `cargo test` just running the tests, which is not the case when you remove
`rsonpath-test` from the workspace.
  • Loading branch information
V0ldek committed Oct 2, 2024
1 parent 466208d commit a98be77
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 610 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
key: x86_64-unknown-linux-gnu-x86_64-unknown-linux-gnu--cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Build with test codegen
id: build-test-codegen
run: cargo build --manifest-path ./crates/rsonpath-test/Cargo.toml -vv
run: cargo build -p rsonpath-test -vv
- name: Upload generated tests as artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
Expand Down
45 changes: 45 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[workspace]

members = ["crates/rsonpath", "crates/rsonpath-lib", "crates/rsonpath-syntax"]

exclude = [
"crates/rsonpath-benchmarks",
"crates/rsonpath-test-codegen",
members = [
"crates/rsonpath",
"crates/rsonpath-lib",
"crates/rsonpath-syntax",
"crates/rsonpath-test",
]

exclude = ["crates/rsonpath-benchmarks", "crates/rsonpath-test-codegen"]

resolver = "2"

[profile.dev]
Expand Down
24 changes: 12 additions & 12 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ doc $RUSTDOCFLAGS="--cfg docsrs":

# Run the codegen for rsonpath-test, generating the E2E tests and JSONs.
gen-tests:
RSONPATH_ENABLE_TEST_CODEGEN=1 cargo build --manifest-path ./crates/rsonpath-test/Cargo.toml
RSONPATH_ENABLE_TEST_CODEGEN=1 cargo build -p rsonpath-test

# === RUN ===

Expand Down Expand Up @@ -101,7 +101,7 @@ test-classifier:

# Run the main engine end-to-end tests on default features.
test-engine: (gen-tests)
cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml --tests -q
cargo test -p rsonpath-test --tests -q

# Run the input tests on default features.
test-input:
Expand All @@ -119,16 +119,16 @@ test-full: (gen-tests)

# Run E2E engine tests on all combinations of SIMD features for x86 platforms.
test-x86-simd:
RSONPATH_UNSAFE_FORCE_SIMD="avx2;fast_quotes;fast_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;fast_quotes;fast_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;fast_quotes;slow_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;slow_quotes;fast_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;slow_quotes;slow_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;fast_quotes;fast_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;fast_quotes;slow_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;slow_quotes;fast_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;slow_quotes;slow_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="nosimd;slow_quotes;slow_popcnt" cargo test --manifest-path ./crates/rsonpath-test/Cargo.toml -q
RSONPATH_UNSAFE_FORCE_SIMD="avx2;fast_quotes;fast_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;fast_quotes;fast_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;fast_quotes;slow_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;slow_quotes;fast_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="ssse3;slow_quotes;slow_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;fast_quotes;fast_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;fast_quotes;slow_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;slow_quotes;fast_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="sse2;slow_quotes;slow_popcnt" cargo test -p rsonpath-test --tests -q
RSONPATH_UNSAFE_FORCE_SIMD="nosimd;slow_quotes;slow_popcnt" cargo test -p rsonpath-test --tests -q

# Run doctests on the library.
test-doc:
Expand Down
Loading

0 comments on commit a98be77

Please sign in to comment.