bin/cubicweb-ctl.bat
author Philippe Pepiot <philippe.pepiot@logilab.fr>
Fri, 26 Oct 2018 17:00:05 +0200
changeset 12356 ed486562ba7e
parent 5499 2a5cc708c2a0
permissions -rw-r--r--
Make test database cache lookup concurrent has_cache() is used to dertermine if the template database already exists or not. When running tests accross multiple process, has_cache() wasn't aware of databases created by other processes because it used a cache to generate the cache... Since the discovering discover_cached_db() time is quite reasonable (it's just about listing file in a directory), let re-generate the cache on cache miss.

@echo off
rem = """-*-Python-*- script
rem -------------------- DOS section --------------------
rem You could set PYTHONPATH or TK environment variables here
python -x "%~f0" %*
goto exit
 
"""
# -------------------- Python section --------------------
import sys
from os.path import join, dirname, normpath
sys.path.insert(0, normpath(join(dirname(__file__), '..', '..')))
from cubicweb.cwctl import run
run(sys.argv[1:])

DosExitLabel = """
:exit
rem """