It's not portable and currently the detection scheme use really easy to break and report false positive. Try to rather launch services on different ports. Change-Id: I0739bea2f8fe42e1bba1c04e6ce5be14237dfbcb
		
			
				
	
	
		
			23 lines
		
	
	
		
			429 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			429 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
set -x -e
 | 
						|
 | 
						|
function clean_exit(){
 | 
						|
    local error_code="$?"
 | 
						|
    local spawned=$(jobs -p)
 | 
						|
    if [ -n "$spawned" ]; then
 | 
						|
        kill $(jobs -p)
 | 
						|
    fi
 | 
						|
    return $error_code
 | 
						|
}
 | 
						|
 | 
						|
trap "clean_exit" EXIT
 | 
						|
 | 
						|
memcached_bin=$(which memcached || true)
 | 
						|
if [ -n "$memcached_bin" ]; then
 | 
						|
    $memcached_bin -p 11212 &
 | 
						|
fi
 | 
						|
 | 
						|
export TOOZ_TEST_MEMCACHED_URL="memcached://localhost:11212?timeout=5"
 | 
						|
# Yield execution to venv command
 | 
						|
$*
 |