Skip to content

tests: build improvements and more - #969

Closed
vszakats wants to merge 25 commits into
libssh2:masterfrom
vszakats:test-syncup
Closed

vszakats wants to merge 25 commits into
libssh2:masterfrom
vszakats:test-syncup

Conversation

@vszakats

@vszakats vszakats commented Apr 15, 2023 •

Copy link
Copy Markdown
Member
  • rename tests to have more succint names and a more useful natural
    order.

  • rename simple and ssh2 in tests to have the test_ prefix.

    This avoids a name collisions with ssh2 in examples.

  • cmake: drop the example- prefix for generated examples.

    Bringing their names in sync with other build tools, like autotools.

  • move common auth test code into the fixture and simplify tests by
    using that.

  • move feature guards from CMake to preprocessor for auth tests.

    Now it works with all build tools and it's easier to keep it in sync
    with the lib itself.

    For this we need to include libssh2_priv.h in tests, which in turn
    needs tweaking on the trick we use to suppress extra MSVS warnings
    when building tests and examples.

  • move mbedTLS blocklist for crypto tests from CMake to the test
    fixture.

  • add ed25519 hostkey tests to test_hostkey and test_hostkey_hash.

  • add shell script to regenerate all test keys used for our tests.

  • alpha-sort tests.

  • rename signed_* keys to begin with key like the rest of the keys
    do.

  • whitespace fixes.

Closes #969

@vszakats
vszakats force-pushed the test-syncup branch 2 times, most recently from 19c3277 to 55c9c5c Compare April 15, 2023 02:58
Include libssh2_priv.h and use LIBSSH2_<feature> macros to enable tests
for them.

"signed" keys don't seem to be crypto-backend dependent, adjust guards
accordingly.
@vszakats vszakats changed the title tidy-up: sync up tests with each other tests: build improvements and more Apr 16, 2023
@vszakats vszakats closed this in 9ecb22d Apr 16, 2023
@vszakats
vszakats deleted the test-syncup branch April 16, 2023 22:51
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
- rename tests to have more succint names and a more useful natural
  order.

- rename `simple` and `ssh2` in tests to have the `test_` prefix.

  This avoids a name collisions with `ssh2` in examples.

- cmake: drop the `example-` prefix for generated examples.

  Bringing their names in sync with other build tools, like autotools.

- move common auth test code into the fixture and simplify tests by
  using that.

- move feature guards from CMake to preprocessor for auth tests.

  Now it works with all build tools and it's easier to keep it in sync
  with the lib itself.

  For this we need to include `libssh2_priv.h` in tests, which in turn
  needs tweaking on the trick we use to suppress extra MSVS warnings
  when building tests and examples.

- move mbedTLS blocklist for crypto tests from CMake to the test
  fixture.

- add ed25519 hostkey tests to `test_hostkey` and `test_hostkey_hash`.

- add shell script to regenerate all test keys used for our tests.

- alpha-sort tests.

- rename `signed_*` keys to begin with `key` like the rest of the keys
  do.

- whitespace fixes.

Closes libssh2#969
vszakats added a commit that referenced this pull request Jul 29, 2026
…ixed now

PR #1758 indeed fixed the issue reported in #793. Let's re-enable the
tests disabled earlier as a CI workaround.

Follow-up to 26f57ef #1758
Follow-up to 9ecb22d #969
Follow-up to 7487dcf
Ref: #793

Closes #2446
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.

1 participant