Skip to content

Commit

Permalink
test: add parallel jobs to uarch-riscv-tests.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
mpolitzer committed Sep 3, 2024
1 parent 40ead51 commit a350746
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 108 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- Added a "--jobs" option to "uarch-riscv-tests.lua" test

### Fixed
- Fixed --skip-root-hash-store not skipping root hash computation when using the cli
Expand Down
4 changes: 2 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ test-uarch-compare:
$(LUA) ./lua/cartesi-machine-tests.lua --test="^rv64ui.*$$" --concurrency=update_merkle_tree:1 --jobs=$(NUM_JOBS) run_host_and_uarch

test-uarch-rv64ui:
$(LUA) ./lua/uarch-riscv-tests.lua run
$(LUA) ./lua/uarch-riscv-tests.lua --jobs=$(NUM_JOBS) run

test-uarch-interpreter:
$(MAKE) -C ../third-party/riscv-arch-test verify XLEN=64 RISCV_TARGET=cartesi RISCV_ISA=rv64i RISCV_DEVICE=I WORK=$(BUILDDIR)/uarch-riscv-arch-test RUN_ARCH_TEST='$(RUN_ARCH_TEST)'
Expand All @@ -218,7 +218,7 @@ test-yield-and-save: | $(CARTESI_IMAGES)
test-misc: test-c-api test-hash test-save-and-load test-yield-and-save

test-generate-uarch-logs: $(BUILDDIR)/uarch-riscv-tests-json-logs
$(LUA) ./lua/uarch-riscv-tests.lua --output-dir=$(BUILDDIR)/uarch-riscv-tests-json-logs --proofs --proofs-frequency=1 --create-uarch-reset-log --create-send-cmio-response-log json-step-logs
$(LUA) ./lua/uarch-riscv-tests.lua --output-dir=$(BUILDDIR)/uarch-riscv-tests-json-logs --proofs --proofs-frequency=1 --create-uarch-reset-log --create-send-cmio-response-log --jobs=$(NUM_JOBS) json-step-logs
tar -czf uarch-riscv-tests-json-logs.tar.gz -C $(BUILDDIR) uarch-riscv-tests-json-logs

coverage-machine:
Expand Down
2 changes: 1 addition & 1 deletion tests/lua/cartesi/parallel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ M.run = function(list, jobs, fn)
else -- special case that doesn't need the `posix` library
local failures = 0
for _, row in ipairs(list) do
-- change to traceback to debug for a shell instead
-- change traceback to debug for a shell instead
local ok, err = xpcall(fn, require("debug").traceback, row)
if not ok then
failures = failures + 1
Expand Down
Loading

0 comments on commit a350746

Please sign in to comment.