diff --git a/shippable.yml b/shippable.yml
index 51f3097..07d610f 100644
--- a/shippable.yml
+++ b/shippable.yml
@@ -21,6 +21,6 @@ before_script:
   - mkdir -p shippable/codecoverage
 
 script:
-  - go test -coverprofile=coverage.txt -covermode count ./...
+  - ./test.sh
   - $GOPATH/bin/gocover-cobertura < coverage.txt > shippable/codecoverage/coverage.xml
 
diff --git a/test.sh b/test.sh
index 89a7703..8dd0242 100755
--- a/test.sh
+++ b/test.sh
@@ -1,4 +1,25 @@
 #!/usr/bin/env bash
 
-go test -v ./...
+# FROM: https://github.com/getlantern/flashlight-build/blob/devel/testandcover.bash
 
+function die() {
+    echo $*
+    exit 1
+}
+
+export GOPATH=`pwd`:$GOPATH
+
+echo "mode: count" > coverage.txt
+
+ERROR=""
+
+for pkg in `cat testpackages.txt`
+do
+    go test -v -covermode=count -coverprofile=profile_tmp.cov $pkg || ERROR="Error testing $pkg"
+    tail -n +2 profile_tmp.cov >> coverage.txt || die "Unable to append coverage for $pkg"
+done
+
+if [ ! -z "$ERROR" ]
+then
+    die "Encountered error, last error was: $ERROR"
+fi
diff --git a/testpackages.txt b/testpackages.txt
new file mode 100644
index 0000000..e72f979
--- /dev/null
+++ b/testpackages.txt
@@ -0,0 +1,3 @@
+github.com/thermokarst/bactdb/models
+github.com/thermokarst/bactdb/datastore
+github.com/thermokarst/bactdb/api