Added basic span reader test.

Might as well right better tests when writing sorting v2.  Backfilling
is needed here before we can build up further.

Change-Id: Ibe805cb031eba3eac4bb3d65dfa318c52e6487e2
diff --git a/aos/testing/tmpdir.cc b/aos/testing/tmpdir.cc
new file mode 100644
index 0000000..15e3c13
--- /dev/null
+++ b/aos/testing/tmpdir.cc
@@ -0,0 +1,18 @@
+#include "aos/testing/tmpdir.h"
+
+#include <cstdlib>
+#include <string>
+
+namespace aos {
+namespace testing {
+
+std::string TestTmpDir() {
+  const char *tmp_dir = std::getenv("TEST_TMPDIR");
+  if (tmp_dir != nullptr) {
+    return tmp_dir;
+  }
+  return "/tmp";
+}
+
+}  // namespace testing
+}  // namespace aos