Write waf build scripts for catalog and unit tests
refs #2596
Change-Id: I384b618ebd2b3126cef5ec524d43525a7df5b780
diff --git a/catalog/src/main.cpp b/catalog/src/main.cpp
new file mode 100644
index 0000000..78e3ccf
--- /dev/null
+++ b/catalog/src/main.cpp
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2015, Colorado State University.
+ *
+ * This file is part of ndn-atmos.
+ *
+ * ndn-atmos is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-atmos is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-atmos, e.g., in COPYING.md file. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-atmos authors and contributors.
+ */
+
+#include <ChronoSync/socket.hpp>
+#include <ndn-cxx/face.hpp>
+
+using namespace std;
+using namespace ndn;
+
+int main()
+{
+ Face face;
+ shared_ptr<chronosync::Socket> socket;
+ return 0;
+}
diff --git a/catalog/tests/boost-test.hpp b/catalog/tests/boost-test.hpp
new file mode 100644
index 0000000..ea01e8f
--- /dev/null
+++ b/catalog/tests/boost-test.hpp
@@ -0,0 +1,37 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NDN_ATMOS_TESTS_BOOST_TEST_HPP
+#define NDN_ATMOS_TESTS_BOOST_TEST_HPP
+
+// suppress warnings from Boost.Test
+#pragma GCC system_header
+#pragma clang system_header
+
+#include <boost/test/unit_test.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/test/output_test_stream.hpp>
+
+#endif // NDN_ATMOS_TESTS_BOOST_TEST_HPP
diff --git a/catalog/tests/main.cpp b/catalog/tests/main.cpp
new file mode 100644
index 0000000..61c4e0f
--- /dev/null
+++ b/catalog/tests/main.cpp
@@ -0,0 +1,28 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+#define BOOST_TEST_MAIN 1
+#define BOOST_TEST_DYN_LINK 1
+
+#include "boost-test.hpp"
diff --git a/catalog/tests/unit-tests/simple.cpp b/catalog/tests/unit-tests/simple.cpp
new file mode 100644
index 0000000..c6b4fbb
--- /dev/null
+++ b/catalog/tests/unit-tests/simple.cpp
@@ -0,0 +1,37 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2015, Colorado State University.
+ *
+ * This file is part of ndn-atmos.
+ *
+ * ndn-atmos is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-atmos is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-atmos, e.g., in COPYING.md file. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-atmos authors and contributors.
+ */
+
+#include <boost/test/unit_test.hpp>
+
+namespace NdnAtmos {
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(MasterSuite)
+
+BOOST_AUTO_TEST_CASE(SimpleTest)
+{
+ BOOST_CHECK(0==0);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} //namespace test
+} //namespace ndn-atmos
diff --git a/catalog/tests/wscript b/catalog/tests/wscript
new file mode 100644
index 0000000..21e0b09
--- /dev/null
+++ b/catalog/tests/wscript
@@ -0,0 +1,44 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+"""
+ Copyright (c) 2013-2015, Regents of the University of California,
+ 2015, Colorado State University.
+
+ This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+
+ ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Lesser General Public License as published by the Free Software
+ Foundation, either version 3 of the License, or (at your option) any later version.
+
+ ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+ You should have received copies of the GNU General Public License and GNU Lesser
+ General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
+ <http://www.gnu.org/licenses/>.
+
+ See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+"""
+
+top = '..'
+
+def build(bld):
+ # unit test objects
+ unit_tests_objects = bld(
+ target="unit-test-objects",
+ name="unit-test-objects",
+ features="cxx",
+ source=bld.path.ant_glob(['unit-tests/**/*.cpp']),
+ use='ndn-cxx BOOST',
+ includes='.',
+ install_path=None)
+
+ # unit test app
+ bld(features='cxx cxxprogram',
+ target='../unit-tests',
+ name='unit-tests-main-unit',
+ source="main.cpp",
+ use='ndn-cxx unit-test-objects BOOST',
+ install_path=None)
+