1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
set -u
MYSQL_VERSION="$(grep ^MYSQL_VERSION= "Makefile" \
| cut -d = -f 2)"
PERCONA_SERVER_VERSION="$(grep ^PERCONA_SERVER_VERSION= "Makefile" \
| cut -d = -f 2)"
PERCONA_SERVER="Percona-Server-${MYSQL_VERSION}-${PERCONA_SERVER_VERSION}"
install_file_type()
{
for file in `ls $1/*.$2 2>/dev/null`; do
test -f $file && install -m 644 $file ${PERCONA_SERVER}/mysql-test/$3
done;
}
do_install_path()
{
install_file_type $1 test t
install_file_type $1 opt t
install_file_type $1 result r
install_file_type $1 require r
install_file_type $1 inc include
}
install_path()
{
echo "[$3/$4] Installing mysql-test files: $2"
test -d $1 && do_install_path $1 $2
}
current=0;
count=`wc -l series`;
install_path mysql-test "global" $current $count
for test_name in `cat series`; do
current=$((current+1));
install_path mysql-test/$test_name $test_name $current $count
done
echo "Done"
|