tests: sync common testing infrastructure with ndn-cxx and NFD

And upgrade waf to version 2.0.21

Change-Id: Id713e0f3035badd97ca7fc03f76e50085b9a266c
diff --git a/tests/peek/ndnpeek.t.cpp b/tests/peek/ndnpeek.t.cpp
index 0e0840a..9951e5c 100644
--- a/tests/peek/ndnpeek.t.cpp
+++ b/tests/peek/ndnpeek.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Arizona Board of Regents.
+ * Copyright (c) 2014-2020,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -20,6 +20,7 @@
 #include "tools/peek/ndnpeek/ndnpeek.hpp"
 
 #include "tests/test-common.hpp"
+#include "tests/io-fixture.hpp"
 
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
@@ -63,7 +64,7 @@
   return opt;
 }
 
-class NdnPeekFixture : public UnitTestTimeFixture
+class NdnPeekFixture : public IoFixture
 {
 protected:
   void
@@ -73,8 +74,7 @@
   }
 
 protected:
-  boost::asio::io_service io;
-  ndn::util::DummyClientFace face{io};
+  ndn::util::DummyClientFace face{m_io};
   output_test_stream output;
   unique_ptr<NdnPeek> peek;
 };
@@ -149,7 +149,7 @@
   {
     CoutRedirector redir(output);
     peek->start();
-    this->advanceClocks(io, 25_ms, 4);
+    this->advanceClocks(25_ms, 4);
     face.receive(*data);
   }
 
@@ -181,7 +181,7 @@
   {
     CoutRedirector redir(output);
     peek->start();
-    this->advanceClocks(io, 25_ms, 4);
+    this->advanceClocks(25_ms, 4);
     face.receive(*data);
   }
 
@@ -205,7 +205,7 @@
   {
     CoutRedirector redir(output);
     peek->start();
-    this->advanceClocks(io, 25_ms, 4);
+    this->advanceClocks(25_ms, 4);
     nack = makeNack(face.sentInterests.at(0), lp::NackReason::NO_ROUTE);
     face.receive(nack);
   }
@@ -224,7 +224,7 @@
   {
     CoutRedirector redir(output);
     peek->start();
-    this->advanceClocks(io, 25_ms, 4);
+    this->advanceClocks(25_ms, 4);
     nack = makeNack(face.sentInterests.at(0), lp::NackReason::NONE);
     face.receive(nack);
   }
@@ -241,7 +241,7 @@
   initialize(options);
 
   peek->start();
-  this->advanceClocks(io, 25_ms, 4);
+  this->advanceClocks(25_ms, 4);
 
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face.sentInterests.back().getCanBePrefix(), false);
@@ -262,12 +262,12 @@
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 0);
 
   peek->start();
-  this->advanceClocks(io, 100_ms, 9);
+  this->advanceClocks(100_ms, 9);
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face.getNPendingInterests(), 1);
   BOOST_CHECK(peek->getResult() == NdnPeek::Result::UNKNOWN);
 
-  this->advanceClocks(io, 100_ms, 2);
+  this->advanceClocks(100_ms, 2);
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face.getNPendingInterests(), 0);
   BOOST_CHECK(peek->getResult() == NdnPeek::Result::TIMEOUT);
@@ -283,7 +283,7 @@
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 0);
 
   peek->start();
-  this->advanceClocks(io, 25_ms, 6);
+  this->advanceClocks(25_ms, 6);
 
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face.getNPendingInterests(), 0);
@@ -300,7 +300,7 @@
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 0);
 
   peek->start();
-  this->advanceClocks(io, 25_ms, 4);
+  this->advanceClocks(25_ms, 4);
 
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face.getNPendingInterests(), 0);
@@ -314,7 +314,7 @@
   initialize(options);
 
   peek->start();
-  BOOST_CHECK_THROW(this->advanceClocks(io, 1_ms, 10), Face::OversizedPacketError);
+  BOOST_CHECK_THROW(this->advanceClocks(1_ms, 10), Face::OversizedPacketError);
 
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 0);
 }