Hello Stefan.petrea,

I'd like you to do a code review.  Please visit

    https://gerrit.wikimedia.org/r/98522

to review the following change.

Change subject: Move tests into tests subdirectory
......................................................................

Move tests into tests subdirectory

Change-Id: I72fba38e02e26ca8077e30c0a6e08695edac298f
---
M Makefile
A tests/Makefile
R tests/README.tests
R tests/big-entry-1.txt
R tests/entries-with-urls-with-spaces-2013-02-10.txt
R tests/entry-line1.txt
R tests/generate-test-data.pl
R tests/test.sh
8 files changed, 23 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/webstatscollector 
refs/changes/22/98522/1

diff --git a/Makefile b/Makefile
index eb47954..730047f 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,10 @@
 #LDFLAGS+=-ldb
 CFLAGS+=-Wall -g
 
+SUBDIRS=tests
+
+RECURSIVE_TARGETS = all-recursive clean-recursive check-recursive
+
 all: collector filter
 
 collector: collector.h collector.c export.c export.o
@@ -25,9 +29,18 @@
 
 clean:
        rm -f *.o collector filter
+       $(MAKE) clean-recursive
 
 check: filter
-       @./test.sh
+       $(MAKE) check-recursive
+
+$(RECURSIVE_TARGETS):
+       list='$(SUBDIRS)' \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$list; do \
+          echo "Making $$target in $$subdir"; \
+          (cd $$subdir && $(MAKE) $$target) \
+        done; \
 
 install:
        install collector filter $(DESTDIR)/usr/local/bin
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..b8d406a
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,8 @@
+all:
+
+
+clean:
+
+
+check:
+       ./test.sh
\ No newline at end of file
diff --git a/README.tests b/tests/README.tests
similarity index 100%
rename from README.tests
rename to tests/README.tests
diff --git a/big-entry-1.txt b/tests/big-entry-1.txt
similarity index 100%
rename from big-entry-1.txt
rename to tests/big-entry-1.txt
diff --git a/entries-with-urls-with-spaces-2013-02-10.txt 
b/tests/entries-with-urls-with-spaces-2013-02-10.txt
similarity index 100%
rename from entries-with-urls-with-spaces-2013-02-10.txt
rename to tests/entries-with-urls-with-spaces-2013-02-10.txt
diff --git a/entry-line1.txt b/tests/entry-line1.txt
similarity index 100%
rename from entry-line1.txt
rename to tests/entry-line1.txt
diff --git a/generate-test-data.pl b/tests/generate-test-data.pl
similarity index 100%
rename from generate-test-data.pl
rename to tests/generate-test-data.pl
diff --git a/test.sh b/tests/test.sh
similarity index 97%
rename from test.sh
rename to tests/test.sh
index 88bee86..c4c4615 100755
--- a/test.sh
+++ b/tests/test.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-FILTER="./filter"
+FILTER="../filter"
 
 TEST_SPACELESS_LINES=`cat entries-with-urls-with-spaces-2013-02-10.txt | 
"$FILTER" | perl -MData::Dumper -ne '@f=split(/\s/,$_,4);  print if $f[3] =~ /\ 
/;' | wc -l`
 

-- 
To view, visit https://gerrit.wikimedia.org/r/98522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72fba38e02e26ca8077e30c0a6e08695edac298f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/webstatscollector
Gerrit-Branch: master
Gerrit-Owner: QChris <christ...@quelltextlich.at>
Gerrit-Reviewer: Stefan.petrea <ste...@garage-coding.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to