Skip to content

make task & better test error message #2981

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

Merged
merged 2 commits into from
Oct 24, 2024
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
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ test: test-rust
test-rust: ## Run Rust tests for glean-core and glean-ffi
cargo test --all $(addprefix --target ,$(GLEAN_BUILD_TARGET))

test-rust-examples: glean-core/rlb/tests/*.sh ## Run Rust example tests
@for file in $^; do \
echo "=== $${file} ==="; \
./$$file || exit $?; \
done

test-rust-with-logs: ## Run all Rust tests with debug logging and single-threaded
RUST_LOG=glean_core=debug cargo test --all -- --nocapture --test-threads=1 $(addprefix --target ,$(GLEAN_BUILD_TARGET))

Expand Down
6 changes: 3 additions & 3 deletions glean-core/rlb/tests/test-delayed-ping-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ fi
$cmd accumulate_ten_and_orderly_shutdown
count=$(ls -1q "$datapath/sent_pings" | wc -l)
if [[ "$count" -ne 0 ]]; then
echo "test result: FAILED."
echo "1/3 test result: FAILED. Expected 0, got $count pings"
exit 101
fi

# Third run sends the ping.
$cmd submit_ping
count=$(ls -1q "$datapath/sent_pings" | wc -l)
if [[ "$count" -ne 1 ]]; then
echo "test result: FAILED."
echo "2/3 test result: FAILED. Expect 1, got $count pings"
exit 101
fi

if ! grep -q '"test.metrics.sample_counter":10' "$datapath"/sent_pings/*; then
echo "test result: FAILED."
echo "3/3 test result: FAILED. Inaccurate number of sample counts."
exit 101
fi

Expand Down
Loading