diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-23 17:40:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-23 17:40:32 +0000 |
commit | 9aeefa0bd7e7604816f3ce08002112f9965176c3 (patch) | |
tree | a321bc3114ba3db3c2375bff886cc0b4e9a324b6 /app-shells/atuin | |
parent | edca36e835d0d4e929c1dd3e9688954ae0aa191a (diff) |
gentoo auto-resync : 23:02:2024 - 17:40:32
Diffstat (limited to 'app-shells/atuin')
-rw-r--r-- | app-shells/atuin/Manifest | 2 | ||||
-rw-r--r-- | app-shells/atuin/atuin-18.0.1.ebuild | 42 |
2 files changed, 37 insertions, 7 deletions
diff --git a/app-shells/atuin/Manifest b/app-shells/atuin/Manifest index 59663a717aeb..67e2c079e353 100644 --- a/app-shells/atuin/Manifest +++ b/app-shells/atuin/Manifest @@ -492,5 +492,5 @@ DIST zerocopy-derive-0.7.32.crate 37623 BLAKE2B 8b583d39d7bf9c3dbbba578120751c66 DIST zeroize-1.7.0.crate 19039 BLAKE2B 2f94a5025f409bd2b96a456d2f78a34c6b05b5554abe7ef3fad2a55a8fcff8a6a1b971be660aa4c2954ab7d6e89bebc431036e349edef74711292f9f64b1dbae SHA512 9d31e3e76e8c861309a3579c21f6da5fd6b056c7d7a350427445a1a832e8827204804783f7f9b808acaa2148efef883d9078bf84943b1db55526bba5bf5a2756 DIST zeroize_derive-1.4.2.crate 11141 BLAKE2B a40add656369a3a40d5b5f3397a77a1e9f803d4b8ae5b7d51c9f2ebb332a289b3c1ea528655806a26998e081a1cc9f4b07828664542de8d8d2619faf079d25c5 SHA512 d6966b024ce5e265c93e7056659ccbb97bbf6baa30f759fd96dc4391a6487426637f61f0a2713b6160019d778cf7d8ff1f25bb33d6c4f4585b990baae418b226 EBUILD atuin-17.2.1.ebuild 10203 BLAKE2B 1202b922b32df642c00597f9b54e755f9cf6f7a6f8fe95e62a66563bc84eed01eb9db31e2c6bed3b7b11c0c5d225c8beb81b7cb69dafb08a85da85bc7454ea7d SHA512 a516b7b7fcfc9695765e890f5aec751087ece2e05e0716f0e7fcdde15a19ee3b6955dc2b7cca8aa30acd4d41174543f1c98fe74f37bf10089ef18cb827e52708 -EBUILD atuin-18.0.1.ebuild 10248 BLAKE2B 5e7ef25c7784c4028076639e7a5afdf5039c4fc9279f8d72ab8416a2bc45c273e32c32ffbe5137d76a1780b94d3e56d5ed6d769197e2d07b063577ef1aa1a261 SHA512 247be19639b7f63cad6e49cc17e035a87b15eec2219f57989c9445df89e0e6382700711d209899dc4962efecc9c17368b96998d43e226602b27e4c7bca39f52e +EBUILD atuin-18.0.1.ebuild 11254 BLAKE2B 7b7619752727e8a33833dbfe6b032e808b6504b194d87db104812214ac3d736bdfa4e4f19a595b67d8a4cb6da9f68eb4c582114cd92105dee3bdd81baad3416f SHA512 63909736efb0ce88959a4ca4feb2a9d05f1ed1363d44a7f042324cb3467a83390a63c8a9c1c4d645c3221d63f3d38519ed023e8ab99855aebfb903b409dcbee9 MISC metadata.xml 832 BLAKE2B dc9cb00bd48c0029c0bb814485ebb0f979d50155d82b437a0f9b8b1c22604d561bb00fe8a2ab13bf76abed1c852ed44fd073c8852e6314eadb96332580455605 SHA512 9a02b7af0977bc37e0d314a5cc9d379adc2914775cc532ea8a64f7eb79eb5dfa255efb2364d022a86fade5d9e4c745ffed195331a511b022f4e99568909b5b02 diff --git a/app-shells/atuin/atuin-18.0.1.ebuild b/app-shells/atuin/atuin-18.0.1.ebuild index db09098f28cc..23014456276e 100644 --- a/app-shells/atuin/atuin-18.0.1.ebuild +++ b/app-shells/atuin/atuin-18.0.1.ebuild @@ -457,6 +457,7 @@ REQUIRED_USE=" test? ( client server sync ) " RDEPEND="server? ( acct-user/atuin )" +DEPEND="test? ( dev-db/postgresql )" BDEPEND=">=virtual/rust-1.71.0" QA_FLAGS_IGNORED="usr/bin/${PN}" @@ -467,12 +468,6 @@ DOCS=( README.md ) -src_prepare() { - default - - rm atuin/tests/sync.rs || die -} - src_configure() { local myfeatures=( $(usev client) @@ -503,6 +498,41 @@ src_compile() { done } +src_test() { + local postgres_dir="${T}"/postgres + initdb "${postgres_dir}" || die + + local port=11123 + # -h '' → only socket connections allowed. + postgres -D "${postgres_dir}" \ + -k "${postgres_dir}" \ + -p "${port}" & + local postgres_pid=${!} + + local timeout_secs=30 + timeout "${timeout_secs}" bash -c \ + 'until printf "" >/dev/tcp/${0}/${1} 2>> "${T}/portlog"; do sleep 1; done' \ + localhost "${port}" || die "Timeout waiting for postgres port ${port} to become available" + + psql -h localhost -p "${port}" -d postgres <<-EOF || die "Failed to configure postgres" + create database atuin; + create user atuin with encrypted password 'pass'; + grant all privileges on database atuin to atuin; + \connect atuin + grant all on schema public to atuin; + EOF + + # Subshell so that postgres_pid is in scope when the trap is executed. + ( + cleanup() { + kill "${postgres_pid}" || die "failed to send SIGTERM to postgres" + } + trap cleanup EXIT + + ATUIN_DB_URI="postgres://atuin:pass@localhost:${port}/atuin" cargo_src_test + ) +} + src_install() { exeinto "/usr/bin" doexe "${ATUIN_BIN}" |