Skip to content

fix: resolve integration test failures on Linux#981

Merged
SchoolyB merged 1 commit intomainfrom
fix/issue-978-integration-test-failures
Jan 10, 2026
Merged

fix: resolve integration test failures on Linux#981
SchoolyB merged 1 commit intomainfrom
fix/issue-978-integration-test-failures

Conversation

@SchoolyB
Copy link
Copy Markdown
Owner

Summary

Resolves #978 - Integration tests fail on Linux due to two issues:

  1. Bash arithmetic with set -e: Post-increment ((PASS_COUNT++)) returns exit code 1 when the counter is 0, causing the script to terminate immediately after the first passing test.

  2. Leftover .ezdb files: The db.ez test creates database files that persist between runs, causing db.keys() to find unexpected keys on subsequent runs.

Changes

integration-tests/run_tests.sh

  • Changed all ((PASS_COUNT++)) to ((++PASS_COUNT))
  • Changed all ((FAIL_COUNT++)) to ((++FAIL_COUNT))

integration-tests/pass/stdlib/db.ez

  • Added @io to imports
  • Added cleanup section to remove test database files:
    • mydb.ezdb
    • rename_test.ezdb
    • sort_test.ezdb

Test Results

  • All 332 integration tests pass
  • db.ez passes on consecutive runs
  • No leftover .ezdb files after test completion

- Change post-increment to pre-increment in run_tests.sh to fix bash
  arithmetic issue with `set -e` (PASS_COUNT++ returns exit code 1
  when counter is 0)
- Add cleanup section to db.ez to remove test database files after
  tests complete, preventing failures on consecutive runs

Fixes #978

Co-Authored-By: UiJong (Jace), Yang <[email protected]>
@SchoolyB SchoolyB merged commit b20d676 into main Jan 10, 2026
5 checks passed
@SchoolyB SchoolyB deleted the fix/issue-978-integration-test-failures branch January 10, 2026 19:42
SchoolyB added a commit that referenced this pull request Apr 3, 2026
- Change post-increment to pre-increment in run_tests.sh to fix bash
  arithmetic issue with `set -e` (PASS_COUNT++ returns exit code 1
  when counter is 0)
- Add cleanup section to db.ez to remove test database files after
  tests complete, preventing failures on consecutive runs

Fixes #978

Co-authored-by: UiJong (Jace), Yang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Integration tests fail due to bash arithmetic and leftover database files

1 participant