okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
159a58a
main
1"""Invoke production storage helpers or compiled test-only effect gates.""" 2 3import os 4from pathlib import Path 5 6ROOT = Path (__file__ ).resolve ().parents [1 ] 7 8 9def maintenance_command (home ,executable = None ,* ,operation = None ,gate = "" ): 10executable = executable or os .environ ["ALBEDO_TEST_DAEMON" ] 11if operation is None : 12return [executable ,"storage" ,"maintain" ,str (home )] 13packages = sorted (Path (executable ).parent .glob ("*/ebin" )) 14if not packages : 15raise RuntimeError ("gated storage tests require the compiled test snapshot" ) 16return [ 17str (ROOT / "priv/bin/albedo-daemon" ), 18"erl" , 19"-pa" , 20* (str (package )for package in packages ), 21"-eval" , 22"albedo@@main:run(harness@storage_maintenance_support)" , 23"-noshell" , 24"-extra" , 25operation , 26str (home ), 27str (gate ), 28 ]