Fixed 'make distclean'
authorMarkus Kauppila <markus.kauppila@gmail.com>
Sat, 06 Aug 2011 19:17:05 +0300
changeset 5808 34114b48f322
parent 5807 473258bc117c
child 5809 adc13772de72
Fixed 'make distclean'
test/test-automation/Makefile.am
test/test-automation/build-scripts/distclean.sh
test/test-automation/build-scripts/install-runner.sh
test/test-automation/build-scripts/install-tests.sh
test/test-automation/src/runner/runner.c
--- a/test/test-automation/Makefile.am	Sat Aug 06 18:55:33 2011 +0300
+++ b/test/test-automation/Makefile.am	Sat Aug 06 19:17:05 2011 +0300
@@ -1,6 +1,7 @@
 ACLOCAL_AMFLAGS = -I acinclude -I build-scripts
 
-SUBDIRS = src/libtest src/runner \
+SUBDIRS = src/libtest \
+		  src/runner \
 		  tests/testdummy \
 		  tests/testrect \
 		  tests/testplatform \
@@ -16,6 +17,6 @@
 install-tests:
 	$(SHELL) build-scripts/install-tests.sh
 
-clean:
-clean-local:
-	echo "clean-local is obsolete"
+distclean-local:
+	$(SHELL) build-scripts/distclean.sh
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/test-automation/build-scripts/distclean.sh	Sat Aug 06 19:17:05 2011 +0300
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+DIRECTORY="tests"
+EXT="error"
+
+PLATFORM="$(uname)"
+if [[ $PLATFORM ==  "Linux" ]]; then
+	EXT="so"
+elif [[ $PLATFORM ==  "Darwin" ]]; then
+	EXT="dylib"
+fi
+
+echo "Debug: $DIRECTORY/*.$EXT"
+
+rm -f $DIRECTORY/*.$EXT
+rm -f runner
+rm -f *.bmp
--- a/test/test-automation/build-scripts/install-runner.sh	Sat Aug 06 18:55:33 2011 +0300
+++ b/test/test-automation/build-scripts/install-runner.sh	Sat Aug 06 19:17:05 2011 +0300
@@ -1,7 +1,5 @@
 #! /bin/bash
 
-#echo "Installing test suites to $DIRECTORY" 
-
 cp src/runner/.libs/runner .
 chmod u+x runner
 
--- a/test/test-automation/build-scripts/install-tests.sh	Sat Aug 06 18:55:33 2011 +0300
+++ b/test/test-automation/build-scripts/install-tests.sh	Sat Aug 06 19:17:05 2011 +0300
@@ -5,7 +5,6 @@
 
 #echo "Installing test suites to $DIRECTORY" 
 
-#rm -Rfv $DIRECTORY/ > /dev/null 2>&1
 mkdir $DIRECTORY > /dev/null 2>&1
 
 PLATFORM="$(uname)"
@@ -21,6 +20,4 @@
 	cp -f "$DIRECTORY/$suite/.libs/lib$suite.$EXT" $DIRECTORY
 done
 
-#sudo cp .libs/libtest.0.dylib /usr/local/lib/libtest.0.dylib
-
 echo "Test suites installed."
--- a/test/test-automation/src/runner/runner.c	Sat Aug 06 18:55:33 2011 +0300
+++ b/test/test-automation/src/runner/runner.c	Sat Aug 06 19:17:05 2011 +0300
@@ -233,7 +233,7 @@
 	}
 
 	while(entry = readdir(directory)) {
-		 // discards . and .. and hidden files starting with .
+		 // discards . and .. and hidden files starting with dot and directories etc.
 		if(strlen(entry->d_name) > 2 && entry->d_name[0] != '.' && entry->d_type == DT_REG) {
 			const char *delimiters = ".";
 			char *name = strtok(entry->d_name, delimiters);