mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 11:55:15 +00:00
25 lines
529 B
Python
Executable File
25 lines
529 B
Python
Executable File
#!/usr/bin/env python3
|
|
import time
|
|
import subprocess
|
|
import sys
|
|
|
|
if len(sys.argv) < 2:
|
|
print('Usage: %s <path-to-memcache>' % sys.argv[0])
|
|
|
|
memcache_path = sys.argv[1]
|
|
|
|
def run(cmd):
|
|
mc = subprocess.Popen([memcache_path])
|
|
print('Memcache started.')
|
|
try:
|
|
time.sleep(0.1)
|
|
cmdline = ['tests/memcache/test_memcache.py'] + cmd
|
|
print('Running: ' + ' '.join(cmdline))
|
|
subprocess.check_call(cmdline)
|
|
finally:
|
|
print('Killing memcache...')
|
|
mc.kill()
|
|
|
|
run([])
|
|
run(['-U'])
|