From 1c74695c1c73ec7d70650261cbf74a173e656845 Mon Sep 17 00:00:00 2001 From: Markus Kauppila Date: Fri, 1 Jul 2011 18:21:11 +0300 Subject: [PATCH] Fixed 'make install' errors by using a bash script. --- test/test-automation/Makefile.am | 8 +------- test/test-automation/install-tests.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) create mode 100755 test/test-automation/install-tests.sh diff --git a/test/test-automation/Makefile.am b/test/test-automation/Makefile.am index 9c31a7f64..9d6b02abd 100644 --- a/test/test-automation/Makefile.am +++ b/test/test-automation/Makefile.am @@ -9,13 +9,7 @@ runner_LDFLAGS = `sdl-config --libs` install: install-tests install-tests: - -mkdir tests - -cp -f testdummy/.libs/*.dylib tests/ 2> /dev/null - -cp -f testdummy/.libs/*.so tests/ 2> /dev/null - -cp -f testrect/.libs/*.dylib tests/ 2> /dev/null - -cp -f testrect/.libs/*.so tests/ 2> /dev/null - -cp -f testplatform/.libs/*.dylib tests/ 2> /dev/null - -cp -f testplatform/.libs/*.so tests/ 2> /dev/null + $(SHELL) install-tests.sh distclean-local: -rm -Rf tests/ docs/ diff --git a/test/test-automation/install-tests.sh b/test/test-automation/install-tests.sh new file mode 100755 index 000000000..1cc771bb7 --- /dev/null +++ b/test/test-automation/install-tests.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +DIRECTORY="tests" +EXT="error" + +echo "Installing test suites to $DIRECTORY" + +rm -Rfv $DIRECTORY 2&>1 /dev/null +mkdir $DIRECTORY 2&>1 /dev/null + +PLATFORM="$(uname)" +if [[ $PLATFORM == "Linux" ]]; then + EXT="so" +elif [[ $PLATFORM == "Darwin" ]]; then + EXT="dylib" +fi + +# TODO: put the test in an array +for suite in "testdummy" "testplatform" "testrect" +do + cp -f "$suite/.libs/lib$suite.$EXT" $DIRECTORY +done + +echo "Test suited installed."