Permalink
Browse files

Beginnings of rudimentary test suite.

Invoking ``make`` in the top-level hierarchy of thrift4go will now
trigger some basic acceptance tests, particularly the Go-based ones.

My plan is to add some follow-on cases for integration with Thrift
stable and other release points.
  • Loading branch information...
1 parent 0939f3f commit 74424f002bfad60712a39b58917c9edb88dcf29e @matttproud matttproud committed Aug 12, 2012
Showing with 49 additions and 0 deletions.
  1. +17 −0 Makefile
  2. +17 −0 lib/Makefile
  3. +15 −0 lib/go/Makefile
View
@@ -0,0 +1,17 @@
+SUB_DIRECTORIES = lib
+CLEAN_DIRECTORIES = $(SUB_DIRECTORIES:%=clean-%)
+TEST_DIRECTORIES = $(SUB_DIRECTORIES:%=test-%)
+
+all: test
+
+test: $(TEST_DIRECTORIES)
+
+$(TEST_DIRECTORIES):
+ $(MAKE) -C $(@:test-%=%) test
+
+clean: $(CLEAN_DIRECTORIES)
+
+$(CLEAN_DIRECTORIES):
+ $(MAKE) -C $(@:clean-%=%) clean
+
+.PHONY: test $(TEST_DIRECTORIES) $(CLEAN_DIRECTORIES)
View
@@ -0,0 +1,17 @@
+SUB_DIRECTORIES = go
+CLEAN_DIRECTORIES = $(SUB_DIRECTORIES:%=clean-%)
+TEST_DIRECTORIES = $(SUB_DIRECTORIES:%=test-%)
+
+all: test
+
+test: $(TEST_DIRECTORIES)
+
+$(TEST_DIRECTORIES):
+ $(MAKE) -C $(@:test-%=%) test
+
+clean: $(CLEAN_DIRECTORIES)
+
+$(CLEAN_DIRECTORIES):
+ $(MAKE) -C $(@:clean-%=%) clean
+
+.PHONY: test $(TEST_DIRECTORIES) $(CLEAN_DIRECTORIES)
View
@@ -0,0 +1,15 @@
+export GOPATH = $(CURDIR)
+ARTIFACTS = test-stamp
+
+all: test
+
+test: test-stamp
+
+test-stamp:
+ cd "$(GOPATH)" && go test -v -x thrift
+ touch $@
+
+clean:
+ -rm -f $(ARTIFACTS)
+
+.PHONY: test clean

0 comments on commit 74424f0

Please sign in to comment.