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

Add back disabled unit tests #254

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add back disabled unit tests
  • Loading branch information
richarddavison committed Mar 8, 2024
commit dbf6b0901318e3e309a49faa8556c02f18e3d25d
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ run-cli: js

test: export JS_MINIFY = 0
test: js
cargo run -- test -d bundle/__tests__/tests/unit
cargo run -- test -d bundle/__tests__/unit
test-e2e: js
cargo run -- test -d bundle/__tests__/tests/e2e
cargo run -- test -d bundle/__tests__/e2e

test-ci: export JS_MINIFY = 0
test-ci: clean-js | toolchain js
cargo $(TOOLCHAIN) -Z panic-abort-tests test --target $(CURRENT_TARGET)
# cargo $(TOOLCHAIN) run -r --target $(CURRENT_TARGET) -- test -d bundle/__tests__/tests/e2e # temporary skip e2e tests when running on Github
cargo $(TOOLCHAIN) run -r --target $(CURRENT_TARGET) -- test -d bundle/__tests__/unit

libs-arm64: lib/arm64/libzstd.a lib/zstd.h
libs-x64: lib/x64/libzstd.a lib/zstd.h
Expand Down
11 changes: 7 additions & 4 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,13 @@ async function buildLibrary() {
});

// Build tests
const testEntryPoints = {};
TEST_FILES.forEach((entry) => {
testEntryPoints[path.join("__tests__", `${entry.slice(0, -3)}`)] = entry;
});
const testEntryPoints = TEST_FILES.reduce((acc, entry) => {
const { name, dir } = path.parse(entry);
const parentDir = path.basename(dir);
acc[path.join("__tests__", parentDir, name)] = entry;
return acc;
}, {});

await esbuild.build({
...defaultLibEsBuildOption,
entryPoints: testEntryPoints,
Expand Down