build+tests: Fixing compilation of unit tests

This commit makes sure that OSX-related tests are enabled only on Darwin
platform.

Change-Id: I997187ee2905e788ac9ae4e777156ed73771053e
diff --git a/tests/wscript b/tests/wscript
index 4dd9c9f..877d24a 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -1,12 +1,21 @@
 # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 
+from waflib import Utils
+
 top = '..'
 
 def build(bld):
     unittests = bld.program (
         target="../unit-tests",
         features = "cxx cxxprogram",
-        source = bld.path.ant_glob(['**/*.cpp']),
+        source = bld.path.ant_glob(['**/*.cpp'],
+                                   excl = ['**/*-osx.cpp', '**/*-sqlite3.cpp']),
         use = 'ndn-cpp-dev',
         install_path = None,
         )
+
+    if Utils.unversioned_sys_platform () == "darwin":
+        unittests.source += bld.path.ant_glob('**/*-osx.cpp')
+
+    # In case we want to make it optional later
+    unittests.source += bld.path.ant_glob('**/*-sqlite3.cpp')