test/test-automation/build-scripts/install-tests.sh
author Markus Kauppila <markus.kauppila@gmail.com>
Fri, 29 Jul 2011 19:52:16 +0300
changeset 5793 e4b84f743a7e
parent 5789 d2123992108f
child 5795 134c0f7ae826
permissions -rwxr-xr-x
Fixed type from usage info.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5735
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
     1
#! /bin/bash
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
     2
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
     3
DIRECTORY="tests"
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
     4
EXT="error"
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
     5
5736
1008297b86e1 Cleaned up the build system. 'make clean' now deletes the installed
Markus Kauppila <markus.kauppila@gmail.com>
parents: 5735
diff changeset
     6
#echo "Installing test suites to $DIRECTORY" 
5735
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
     7
5736
1008297b86e1 Cleaned up the build system. 'make clean' now deletes the installed
Markus Kauppila <markus.kauppila@gmail.com>
parents: 5735
diff changeset
     8
rm -Rfv $DIRECTORY > /dev/null 2>&1
1008297b86e1 Cleaned up the build system. 'make clean' now deletes the installed
Markus Kauppila <markus.kauppila@gmail.com>
parents: 5735
diff changeset
     9
mkdir $DIRECTORY > /dev/null 2>&1
5735
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    10
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    11
PLATFORM="$(uname)"
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    12
if [[ $PLATFORM ==  "Linux" ]]; then
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    13
	EXT="so"
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    14
elif [[ $PLATFORM ==  "Darwin" ]]; then
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    15
	EXT="dylib"
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    16
fi
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    17
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    18
# TODO: put the test in an array
5750
337982ee35ac Ported surface tests.
Markus Kauppila <markus.kauppila@gmail.com>
parents: 5745
diff changeset
    19
for suite in "testdummy" "testplatform" "testrect" "testaudio" "testsurface"
5735
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    20
do
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    21
	cp -f "$suite/.libs/lib$suite.$EXT" $DIRECTORY
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    22
done
9c13e2cef98d Fixed 'make install' errors by using a bash script.
Markus Kauppila <markus.kauppila@gmail.com>
parents:
diff changeset
    23
5793
e4b84f743a7e Fixed type from usage info.
Markus Kauppila <markus.kauppila@gmail.com>
parents: 5789
diff changeset
    24
sudo cp .libs/libtest.0.dylib /usr/local/lib/libtest.0.dylib
5788
eeb5431a8cbf Made run seed more file name friendly.
Markus Kauppila <markus.kauppila@gmail.com>
parents: 5750
diff changeset
    25
5736
1008297b86e1 Cleaned up the build system. 'make clean' now deletes the installed
Markus Kauppila <markus.kauppila@gmail.com>
parents: 5735
diff changeset
    26
echo "Test suites installed."