 b776ed7821
			
		
	
	b776ed7821
	
	
	
		
			
			Some of the scripts assumed that other scripts would be located in the same directory where the current script was executed. Also fixed the SSL connection creation which depended on an obsolete environment variable causing all out-of-source SSL tests to fail.
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| script=`basename "$0"`
 | |
| 
 | |
| if [ $# -lt 1 ]
 | |
| then
 | |
|     echo "usage: $script name [user] [password]"
 | |
|     echo ""
 | |
|     echo "name    : The name of the test (from CMakeLists.txt) That selects the"
 | |
|     echo "          configuration template to be used."
 | |
|     echo "user    : The user using which the test should be run."
 | |
|     echo "password: The password of the user."
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| if [ "$maxscale_IP" == "" ]
 | |
| then
 | |
|     echo "Error: The environment variable maxscale_IP must be set."
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| src_dir=$(dirname $(realpath $0))
 | |
| source=$src_dir/masking/$1/masking_rules.json
 | |
| target=$maxscale_access_user@$maxscale_IP:/home/$maxscale_access_user/masking_rules.json
 | |
| 
 | |
| if [ $maxscale_IP != "127.0.0.1" ] ; then
 | |
| 	scp -i $maxscale_keyfile -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $source $target
 | |
| else
 | |
| 	cp $source /home/$maxscale_access_user/masking_rules.json
 | |
| fi
 | |
| 
 | |
| if [ $? -ne 0 ]
 | |
| then
 | |
|     echo "error: Could not copy rules file to maxscale host."
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| echo $source copied to $target
 | |
| 
 | |
| test_dir=`pwd`
 | |
| 
 | |
| $test_dir/non_native_setup $1
 | |
| 
 | |
| password=
 | |
| if [ $# -ge 3 ]
 | |
| then
 | |
|     password=$3
 | |
| fi
 | |
| 
 | |
| user=
 | |
| if [ $# -ge 2 ]
 | |
| then
 | |
|     user=$2
 | |
| fi
 | |
| 
 | |
| # [Read Connection Listener Master] in cnf/maxscale.maxscale.cnf.template.$1
 | |
| port=4008
 | |
| 
 | |
| $src_dir/mysqltest_driver.sh $1 $src_dir/masking/$1 $port $user $password
 |