Commit Graph
36 Commits
Author SHA1 Message Date
Daniel McCarney 44bac99c6e fix: avoid hardcoded (ba)sh path in helper scripts.
Prior to this commit some helper scripts used hardcoded paths to
`/bin/sh` and `/bin/bash` in script shebangs. This will error on systems
that don't place `bash` in `/bin/` (e.g. NixOS).

This commit updates the scripts to use `/usr/bin/env` to find `bash`
based on the user's `$PATH`. This has better portability and allows the
scripts to run without err (or specifying an interpreter explicitly) on
systems with atypical `bash` installs.
2023-03-02 10:28:10 +01:00
Joseph Birr-Pixton 6087246dbf Measure coverage using cargo-llvm-cov
This deletes quite a bit of ad-hoc scripting that is
replaced by llvm-cov.
2022-12-31 13:23:01 +00:00
Joseph Birr-Pixton 8f10338d53 Use absolute path to admin/llvm-gcov 2022-08-15 15:45:22 +02:00
Dirkjan Ochtman f2e4d88d05 Use stable instrument-coverage flag 2022-08-15 15:45:22 +02:00
Dirkjan Ochtman 00486d39a0 Use Python 3 to run coverage script 2022-08-15 15:45:22 +02:00
Dirkjan Ochtman 6b8de51b26 Upgrade coverage LLVM to 15 to track nightly Rust 2022-08-15 15:45:22 +02:00
Brian Smith 71c902cd5e Use LLVM 14 for code coverage.
Rust Nightly recently upgraded to LLVM 14, and coverage jobs in CI
are currently broken. Fix them by upgrading to LLVM 14.
2022-02-19 08:15:08 +01:00
Brian Smith 0fe3052208 Tests: Move dangerous_configuration` cert verifier tests into separate suites.
Make it easier to find the {Client,Server}CertVerifier tests. Split
them into separate files so that we can use `diff` to compare how we're
testing each.

This removes all of the `dangerous_configuration` tests from tests/api.rs.

Each of the mock Client/Server verifiers were eached move into the single test
suite that uses it.

Use these commands with a whitespace-smart diff tool to see that the tests
were not modified except for whitespace and formatting:
```
git difftool HEAD^1:rustls/tests/api.rs rustls/tests/server_cert_verifier.rs
git difftool HEAD^1:rustls/tests/api.rs rustls/tests/client_cert_verifier.rs
git difftool HEAD^1:rustls/tests/common/mod.rs rustls/tests/client_cert_verifier.rs
git difftool HEAD^1:rustls/tests/common/mod.rs rustls/tests/server_cert_verifier.rs
```
2022-01-25 10:28:44 +01:00
Brian Smith 8c203e1500 Restore thread-safety to the integration test suite w.r.t. env::set_var.
Serialize all tests that use `std::env::set_var` & isolate them. See the
comments in key_log_file_env.rs for details.

Also add notes about the fact that these tests aren't really testing the
functionality.

Use a whitespace-smart diff tool to compare the new file to what was in
api.rs:
```
git difftool HEAD^1:rustls/tests/api.rs rustls/tests/key_log_file_env.rs
```
2022-01-22 11:27:08 +00:00
Joseph Birr-Pixton 19357c4028 Track nightly's move to LLVM13 2021-08-28 13:51:30 +01:00
Dirkjan Ochtman 6e05d9222e Adapt to changed rustc unstable option handling 2021-07-23 14:12:27 +01:00
Joseph Birr-Pixton b65b466f6c Fix coverage measurements
Bogo tests were being excluded, since 035178d3.
2021-04-09 11:02:24 +01:00
Dirkjan Ochtman 8ebe493675 Check LLVM version in coverage script (see #551) 2021-03-12 21:07:03 +00:00
Joseph Birr-Pixton 4ce9a1baab Install and use llvm11 for coverage tooling 2020-10-25 09:02:17 +00:00
Joseph Birr-Pixton 1d84ad77d4 Try out github actions 2020-07-04 15:10:56 +01:00
Andrew Bennett 7e993dcd6b WIP - change admin/coverage to point to llvm-7 instead of llvm-3.8 2020-06-20 16:35:09 +01:00
Joseph Birr-Pixton 6f252aa812 Fix coverage: output binaries have moved in nightly 2020-06-08 21:23:50 +01:00
Joseph Birr-Pixton cb397f0e15 Test detection of truncated handshake messages 2020-05-08 16:55:34 +01:00
Joseph Birr-Pixton b2fa83cada Fix coverage build
Upstream removed -Zno-landing-pads; unfortunately there's still
no better coverage tooling.

Fortunately -Cpanic=abort is now feasible for tests thanks to
-Zpanic-abort-tests.
2020-05-03 11:34:02 +01:00
Joseph Birr-Pixton 1d70e45af6 Move to using cargo workspaces
- rustls (the library) now lives in rustls/
- the mio examples/tests continue to live in rustls-mio, but
  are built by (eg) `cargo test` in the root of the repo.
2019-08-24 20:55:20 +01:00
Joseph Birr-Pixton 31e12febf8 Try codecov.io instead
- Temporarily remove branch coverage measurement
- Also install llvm & llvm-3.8
2019-03-10 13:54:56 +00:00
Joseph Birr-Pixton edf98927dc Split up mio-using examples/tests 2019-03-08 19:04:05 +00:00
Joseph Birr-Pixton 13ad4dc122 Remove macros.rs from coverage
Recent nightly rustc wrongly generates 700 lines
of code in this file.
2018-05-12 22:10:54 +01:00
Joseph Birr-Pixton 605c58974b Disable CARGO_INCREMENTAL to fix coverage build 2018-03-12 23:20:12 +00:00
Joseph Birr-Pixton 338f2874a8 don't work around cargo nightly bugs; use stable 2017-12-28 13:06:10 +00:00
Joseph Birr-Pixton 2405ab417f fix for cargo RUSTC_WRAPPER brokenness
(unfortunately won't fix coverage build; cargo nightly
is broken)
2017-12-28 11:45:50 +00:00
Joseph Birr-Pixton 1ad65d1621 More workarounds for travis CI 2017-09-10 18:19:05 +01:00
Joseph Birr-Pixton fb7020f961 travis: do coverage on nightly rust 2017-07-22 20:19:56 +01:00
Joseph Birr-Pixton d7ae542376 Accept inaccurate coverage for the time being 2017-07-22 19:12:42 +01:00
Joseph Birr-Pixton 63ad242efa Clean up coverage scripts 2017-07-19 20:46:11 +01:00
Joseph Birr-Pixton 03a5738c85 Only measure coverage of library source 2017-06-18 13:39:32 +01:00
Joseph Birr-Pixton e7a54f60f2 Use lcov/llvm for coverage 2017-06-17 22:08:22 +01:00
Joseph Birr-Pixton a33ffdafda Run TryTLS tests 2016-10-08 19:27:35 +01:00
Joseph Birr-Pixton 44950b3a19 attach coveralls to travis 2016-09-25 13:45:34 +01:00
Joseph Birr-Pixton e5d47ce8b1 Fix coverage build on os-x
Squashed commit of the following:

commit 72ab42b890a3c6812796283000ab3ec4bceaca9a
Author: Joseph Birr-Pixton <jpixton@gmail.com>
Date:   Fri Sep 23 22:07:21 2016 +0100

    fix osx and leaving dangerous verify.rs around

commit f49bc6429f607c9f9351d1a9a6acbb81de353b6e
Author: Joseph Birr-Pixton <jpixton@gmail.com>
Date:   Fri Sep 23 21:18:20 2016 +0100

    fix bogo instantiation

commit 047855a3c79702e62a3a93ef5128d5a5b4af8a4f
Author: Joseph Birr-Pixton <jpixton@gmail.com>
Date:   Fri Sep 23 21:09:56 2016 +0100

    don't use realpath, use readlink

commit e4a3e9bc5052466da300507220242f21241f351f
Author: Joseph Birr-Pixton <jpixton@gmail.com>
Date:   Fri Sep 23 20:56:23 2016 +0100

    need coreutils
2016-09-23 22:28:28 +01:00
Joseph Birr-Pixton da7e810883 Coverage work: run tools perhaps through a wrapper 2016-09-23 20:38:08 +01:00