stellar-core: enable focused test smoke checks
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
libtool,
|
||||
libunwind,
|
||||
perl,
|
||||
postgresql,
|
||||
postgresqlTestHook,
|
||||
pkg-config,
|
||||
ripgrep,
|
||||
rustc,
|
||||
@@ -113,6 +115,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
rustPlatform.cargoSetupHook
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
postgresql
|
||||
postgresqlTestHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libpq
|
||||
libunwind
|
||||
@@ -120,6 +127,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postgresqlTestUserOptions = "LOGIN CREATEDB";
|
||||
|
||||
postgresqlTestSetupPost = ''
|
||||
for database in $(seq 0 15); do
|
||||
createdb "test$database"
|
||||
done
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
# Due to https://github.com/NixOS/nixpkgs/issues/8567 we cannot rely on
|
||||
# having the .git directory present, so directly provide the version
|
||||
@@ -142,6 +159,19 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# The full upstream test suite is too heavy for a default package check: it
|
||||
# includes long-running integration scenarios and Soroban tests across all
|
||||
# p21-p26 protocol crates. Keep this focused on a basic consensus smoke test
|
||||
# plus a PostgreSQL-backed persistence test.
|
||||
./src/stellar-core test --ll fatal -w NoTests -a -r simple --disable-dots "standalone"
|
||||
./src/stellar-core test --ll fatal -w NoTests -a -r simple --disable-dots "SCP State"
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Reference peer-to-peer agent that manages the Stellar network";
|
||||
longDescription = ''
|
||||
|
||||
Reference in New Issue
Block a user