Skip to content

Small fixes#5122

Open
drebelsky wants to merge 5 commits intostellar:masterfrom
drebelsky:small-fixes
Open

Small fixes#5122
drebelsky wants to merge 5 commits intostellar:masterfrom
drebelsky:small-fixes

Conversation

@drebelsky
Copy link
Contributor

@drebelsky drebelsky commented Feb 3, 2026

  • Add tracy binaries to .gitignore
  • Add check for SecretKey::random in tests
  • Remove duplicated header guard
  • Don't run Soroban tests when Catch2 tests fail
  • Remove outdated documentation (Remove support for old V1 survey #4660 removed the "surveytopology" endpoint)

Copilot AI review requested due to automatic review settings February 3, 2026 19:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR includes several small miscellaneous fixes to improve the development workflow and test infrastructure.

Changes:

  • Adds tracy profiling tool binaries to .gitignore
  • Adds static check to prevent use of SecretKey::random() in test files
  • Removes redundant #pragma once directive from basen.h header (which already has include guards)
  • Attempts to modify CI to skip Soroban tests when Catch2 tests fail

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
.gitignore Adds tracy-capture and tracy-gui binaries to ignore list
src/test/check-nondet Adds check to prevent non-deterministic SecretKey::random() usage in tests
lib/util/basen.h Removes duplicate #pragma once (file uses traditional include guards)
ci-build.sh Adds TESTS_ENVIRONMENT to skip tests after failures (has implementation issues)

ci-build.sh Outdated
Comment on lines 218 to 223
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TESTS_ENVIRONMENT variable in automake is designed to set environment variables that will be available to test scripts, not to execute conditional shell logic that gates test execution. The approach here of using [ $$failed -ne 0 ] && exit 77 || may not work as intended because:

  1. The failed variable in automake's serial test harness is a shell variable in the test-suite.log generation logic, not an environment variable accessible to individual test commands
  2. Even if failed were accessible, the TESTS_ENVIRONMENT is typically evaluated before the test command in a way that may not interact correctly with the test exit codes

Consider using a custom test wrapper script or LOG_COMPILER variable instead to implement this skip-on-failure logic. A wrapper script approach would be more reliable and easier to understand.

Suggested change
# For automake serial tests, once one test fails, stop executing further tests;
# exit code 77 indicates skipped tests
export TESTS_ENVIRONMENT='[ $$failed -ne 0 ] && exit 77 || '
# failed is not defined for parallel tests; to avoid problems with an unset
# variable in TESTS_ENVIRONMENT, we define it here
export failed=0

Copilot uses AI. Check for mistakes.
@drebelsky
Copy link
Contributor Author

drebelsky commented Feb 3, 2026

Putting some notes on the CI modification. This approach seems to work, although it does feel somewhat hacky (especially since it's relying on the internal automake implementation of serialized tests using a failed variable). In particular, I don't think it will handle stopping the rest of the tests if one of the recursive lib tests fails (although, if the lib tests are run serially, it will stop that serial run). Additionally, since the order of the tests in src is selftest-{no}pg, check-nondet, check-sorobans, we get the odd behavior where failing check-nondet stops check-sorobans from running (but not selftest). I'm happy to remove or rewrite the commit based on what others think, but I'm leaning toward wrapping selftest-{no}pg and check-sorobans into a wrapper script so that check-sorobans only runs when selftest passes (leaving the rest of the behavior as it was pre this PR).

@bboston7
Copy link
Contributor

I'm leaning toward wrapping selftest-{no}pg and check-sorobans into a wrapper script so that check-sorobans only runs when selftest passes (leaving the rest of the behavior as it was pre this PR).

I like this option. I agree that depending on automake internals is not ideal.

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.

2 participants

Comments