Parcourir la source

[3797] Use TEST_DATA_BUILDDIR for unit tests

Replaced use of TEST_DATA_DIR with TEST_DATA_BUILDDIR for socket_path
and fixed cast of close.
Thomas Markwalder il y a 9 ans
Parent
commit
79df1b2a03
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc

+ 2 - 2
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc

@@ -54,7 +54,7 @@ public:
     /// @brief Closes the Control Channel socket
     void disconnectFromServer() {
         if (socket_fd_ >= 0) {
-            (void)(close(socket_fd_));
+            static_cast<void>(close(socket_fd_));
             socket_fd_ = -1;
         }
     }
@@ -223,7 +223,7 @@ public:
     boost::shared_ptr<NakedControlledDhcpv6Srv> server_;
 
     CtrlChannelDhcpv6SrvTest() {
-        socket_path_ = string(TEST_DATA_DIR) + "/kea6.sock";
+        socket_path_ = string(TEST_DATA_BUILDDIR) + "/kea6.sock";
         reset();
     }