Skip to content

Commit

Permalink
rebase on main, generalize a bit
Browse files Browse the repository at this point in the history
Created using spr 1.3.6-beta.1
  • Loading branch information
sunshowers committed Aug 29, 2024
2 parents fee7de3 + 27191f0 commit a123bb7
Show file tree
Hide file tree
Showing 214 changed files with 17,600 additions and 11,695 deletions.
22 changes: 19 additions & 3 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
#
# The required version should be bumped up if we need new features, performance
# improvements or bugfixes that are present in newer versions of nextest.
nextest-version = { required = "0.9.64", recommended = "0.9.70" }
nextest-version = { required = "0.9.77", recommended = "0.9.77" }

experimental = ["setup-scripts"]

[[profile.default.scripts]]
# Exclude omicron-dev tests from crdb-seed as we explicitly want to simulate an
# environment where the seed file doesn't exist.
filter = 'rdeps(nexus-test-utils) - package(omicron-dev)'
# Exclude omicron-live-tests because those don't need this and also don't have
# it available in the environment in which they run.
filter = 'rdeps(nexus-test-utils) - package(omicron-dev) - package(omicron-live-tests)'
setup = 'crdb-seed'

[profile.ci]
Expand All @@ -21,13 +23,20 @@ fail-fast = false
# invocations of nextest happen.
command = 'cargo run -p crdb-seed --profile test'

[test-groups]
# The ClickHouse cluster tests currently rely on a hard-coded set of ports for
# the nodes in the cluster. We would like to relax this in the future, at which
# point this test-group configuration can be removed or at least loosened to
# support testing in parallel. For now, enforce strict serialization for all
# tests with `replicated` in the name.
[test-groups]
clickhouse-cluster = { max-threads = 1 }
# While most Omicron tests operate with their own simulated control plane, the
# live-tests operate on a more realistic, shared control plane and test
# behaviors that conflict with each other. They need to be run serially.
live-tests = { max-threads = 1 }

[profile.default]
default-filter = 'all() - package(omicron-live-tests) - package(end-to-end-tests)'

[[profile.default.overrides]]
filter = 'package(oximeter-db) and test(replicated)'
Expand All @@ -43,3 +52,10 @@ filter = 'binary_id(omicron-nexus::test_all)'
# As of 2023-01-08, the slowest test in test_all takes 196s on a Ryzen 7950X.
# 900s is a good upper limit that adds a comfortable buffer.
slow-timeout = { period = '60s', terminate-after = 15 }

[profile.live-tests]
default-filter = 'package(omicron-live-tests)'

[[profile.live-tests.overrides]]
filter = 'package(omicron-live-tests)'
test-group = 'live-tests'
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Whitespace-only changes
d01ba56c2127789d85723793380a7378394583f1
8 changes: 7 additions & 1 deletion .github/buildomat/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ target_os=$1
# NOTE: This version should be in sync with the recommended version in
# .config/nextest.toml. (Maybe build an automated way to pull the recommended
# version in the future.)
NEXTEST_VERSION='0.9.70'
NEXTEST_VERSION='0.9.77'

cargo --version
rustc --version
Expand Down Expand Up @@ -89,6 +89,12 @@ ptime -m timeout 2h cargo nextest run --profile ci --locked --verbose
banner doctest
ptime -m timeout 1h cargo test --doc --locked --verbose --no-fail-fast

# Build the live-tests. This is only supported on illumos.
# We also can't actually run them here. See the README for more details.
if [[ $target_os == "illumos" ]]; then
ptime -m cargo xtask live-tests
fi

# We expect the seed CRDB to be placed here, so we explicitly remove it so the
# rmdir check below doesn't get triggered. Nextest doesn't have support for
# teardown scripts so this is the best we've got.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@37129d5de13e9122cce55a7a5e7e49981cef514c # v2
uses: taiki-e/install-action@11053896c3ed8d313b47efa789def6474abd1e6b # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
Loading

0 comments on commit a123bb7

Please sign in to comment.