lab 2 realization: PostgreSQL, Valkey, track 2

This commit is contained in:
R0flyan
2026-10-16 15:24:08 +03:00
parent 65003b6119
commit a434e35336
45 changed files with 3386 additions and 54 deletions
+17
View File
@@ -0,0 +1,17 @@
"""Run unchanged make targets in Linux, including the executable restart.sh."""
import argparse
from pathlib import Path
import subprocess
root=Path(__file__).resolve().parents[1]
p=argparse.ArgumentParser()
p.add_argument('target',choices=['check','test','test-own','test-race','test-persistence'])
args=p.parse_args()
command=['docker','run','--rm','--network','mtusi-lab2_default',
'--mount','type=bind,source='+str(root)+',target=/workspace']
if args.target=='test-persistence':
command+=['--mount','type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock']
command+=['mtusi-messenger:lab2-tests','make',args.target,'BASE_URL=http://api:8080']
if args.target=='test-persistence':
command+=['ACTION_SCRIPT=scripts/restart.sh']
raise SystemExit(subprocess.call(command,cwd=root))