Fixed 'make install' errors by using a bash script.
authorMarkus Kauppila
Fri, 01 Jul 2011 18:21:11 +0300
changeset 57359c13e2cef98d
parent 5734 5f1c8cce197a
child 5736 1008297b86e1
Fixed 'make install' errors by using a bash script.
test/test-automation/Makefile.am
test/test-automation/install-tests.sh
     1.1 --- a/test/test-automation/Makefile.am	Fri Jul 01 17:11:20 2011 +0300
     1.2 +++ b/test/test-automation/Makefile.am	Fri Jul 01 18:21:11 2011 +0300
     1.3 @@ -9,13 +9,7 @@
     1.4  
     1.5  install: install-tests
     1.6  install-tests:
     1.7 -	-mkdir tests
     1.8 -	-cp -f testdummy/.libs/*.dylib tests/ 2> /dev/null
     1.9 -	-cp -f testdummy/.libs/*.so tests/ 2> /dev/null
    1.10 -	-cp -f testrect/.libs/*.dylib tests/ 2> /dev/null
    1.11 -	-cp -f testrect/.libs/*.so tests/ 2> /dev/null
    1.12 -	-cp -f testplatform/.libs/*.dylib tests/ 2> /dev/null
    1.13 -	-cp -f testplatform/.libs/*.so tests/ 2> /dev/null
    1.14 +	$(SHELL) install-tests.sh
    1.15  
    1.16  distclean-local:
    1.17  	-rm -Rf tests/ docs/
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/test/test-automation/install-tests.sh	Fri Jul 01 18:21:11 2011 +0300
     2.3 @@ -0,0 +1,24 @@
     2.4 +#! /bin/bash
     2.5 +
     2.6 +DIRECTORY="tests"
     2.7 +EXT="error"
     2.8 +
     2.9 +echo "Installing test suites to $DIRECTORY" 
    2.10 +
    2.11 +rm -Rfv $DIRECTORY 2&>1 /dev/null
    2.12 +mkdir $DIRECTORY 2&>1 /dev/null
    2.13 +
    2.14 +PLATFORM="$(uname)"
    2.15 +if [[ $PLATFORM ==  "Linux" ]]; then
    2.16 +	EXT="so"
    2.17 +elif [[ $PLATFORM ==  "Darwin" ]]; then
    2.18 +	EXT="dylib"
    2.19 +fi
    2.20 +
    2.21 +# TODO: put the test in an array
    2.22 +for suite in "testdummy" "testplatform" "testrect"
    2.23 +do
    2.24 +	cp -f "$suite/.libs/lib$suite.$EXT" $DIRECTORY
    2.25 +done
    2.26 +
    2.27 +echo "Test suited installed."