cleaned google-log deps entirely
authorvictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Fri, 6 Nov 2009 14:12:12 +0000 (14:12 +0000)
committervictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Fri, 6 Nov 2009 14:12:12 +0000 (14:12 +0000)
git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@504 e16421f0-f15b-0410-abcd-98678b794739

SConstruct
tests/dgramtest.cpp
tests/ledbattest.cpp
tests/ledbattest2.cpp
tests/transfertest.cpp

index 62d2347..c7d0246 100644 (file)
@@ -5,12 +5,6 @@
 #  - scons: Cross-platform build system    http://www.scons.org/
 #  - googletest: Google C++ Test Framework http://code.google.com/p/googletest/
 #       * Install in ..\gtest-1.4.0
-#  - google-glog: Google Logging Library for C++  http://code.google.com/p/google-glog/
-#       * Install in ..\glog-0.3.0 
-#       * I get ..\glog-0.3.0\src\windows\glog/log_severity.h(51) : error C2059: syntax error :
-#         'constant' while running scons. Apparently the ERROR constant is already defined somewhere.
-#         #undef ERROR before the def allows include.
-#
 #  - OpenSSL: http://www.slproweb.com/products/Win32OpenSSL.html
 #       * Install non-light Win32 binary in \openssl
 #       * Using a openssl-0.9.8k tar-ball doesn't work as the includes there
@@ -43,7 +37,6 @@ if sys.platform == "win32":
                
        include = os.environ['INCLUDE']
        include += '..\\gtest-1.4.0\\include;'
-       include += '..\\glog-0.3.0\\src\\windows;' # Funky
        include += '\\openssl\\include;' 
        
        env.Append ( ENV = { 'INCLUDE' : include } )
@@ -58,7 +51,7 @@ if sys.platform == "win32":
        source += ['compat/unixio.cpp']
  
        # Set libs to link to
-       libs = ['libglog','ws2_32']
+       libs = ['ws2_32']
        if DEBUG:
                libs += ['gtestd','libeay32MTd']
        else:
@@ -68,11 +61,9 @@ if sys.platform == "win32":
        libpath = os.environ['LIBPATH']
        if DEBUG:
                libpath += '\\build\\gtest-1.4.0\\msvc\\gtest\\Debug;'
-               libpath += '\\build\\glog-0.3.0\\vsprojects\\libglog\\Debug;'
                libpath += '\\openssl\\lib\\VC\\static;'
        else:
                libpath += '\\build\\gtest-1.4.0\\msvc\\gtest\\Release;'
-               libpath += '\\build\\glog-0.3.0\\vsprojects\\libglog\\Release;'
                libpath += '\\openssl\\lib;'
        # Somehow linker can't find uuid.lib
        libpath += 'C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Lib;'
@@ -91,7 +82,7 @@ else:
        #       env.Append(CXXFLAGS="-g")
 
        # Set libs to link to
-       libs = ['stdc++','gtest','glog','pthread','crypto']
+       libs = ['stdc++','gtest','pthread','crypto']
        if 'LIBPATH' in os.environ:
            libpath = os.environ['LIBPATH']
        else:
index 5d580cb..24822a0 100644 (file)
@@ -96,7 +96,6 @@ int main (int argc, char** argv) {
        p2tp::LibraryInit();
 
        testing::InitGoogleTest(&argc, argv);
-    google::InitGoogleLogging(argv[0]);
        return RUN_ALL_TESTS();
 
 }
index 8abd9da..55af714 100644 (file)
@@ -5,7 +5,6 @@
 #include "datagram.h"
 #include "p2tp.h"
 #include <gtest/gtest.h>
-//#include <glog/logging.h>
 
 using namespace p2tp;
 using namespace std;
@@ -171,8 +170,7 @@ int main (int argc, char** argv) {
     printf("Warning: use the script to set up dummynet!\n");
 
     p2tp::LibraryInit();
-
     testing::InitGoogleTest(&argc, argv);
-    google::InitGoogleLogging(argv[0]);
     return RUN_ALL_TESTS();
+
 }
index 4fdf7cb..2dc8b3a 100644 (file)
@@ -52,9 +52,9 @@ TEST(Datagram,LedbatTest) {
     int sec_ackd = 0;
 
     // bind sending socket
-    SOCKET send_sock = Datagram::Bind(Datagram::Address(INADDR_ANY,send_port));
+    SOCKET send_sock = Datagram::Bind(Address(INADDR_ANY,send_port));
     // bind receiving socket
-    SOCKET ack_sock = Datagram::Bind(Datagram::Address(INADDR_ANY,ack_port));
+    SOCKET ack_sock = Datagram::Bind(Address(INADDR_ANY,ack_port));
     struct sockaddr_in send_to, ack_to;
     memset(&send_to, 0, sizeof(struct sockaddr_in));
     memset(&ack_to, 0, sizeof(struct sockaddr_in));
@@ -188,7 +188,6 @@ int main (int argc, char** argv) {
     p2tp::LibraryInit();
     printf("Warning: use the script to set up dummynet!\n");
     testing::InitGoogleTest(&argc, argv);
-    google::InitGoogleLogging(argv[0]);
     dest_addr = htonl(INADDR_LOOPBACK);
     while ((opt = getopt(argc, argv, "a:d:s:h")) != -1)
         switch (opt) {
index 86ea728..334f9a8 100644 (file)
@@ -99,8 +99,6 @@ TEST(TransferTest,TransferFile) {
 
 int main (int argc, char** argv) {
 
-       google::InitGoogleLogging(argv[0]);
-
        std::string tempdir = gettmpdir();
     unlink((tempdir + std::string(".70196e6065a42835b1f08227ac3e2fb419cf78c8.0.hashes")).c_str());
     unlink((tempdir + std::string(".70196e6065a42835b1f08227ac3e2fb419cf78c8.0.peaks")).c_str());
@@ -115,7 +113,7 @@ int main (int argc, char** argv) {
        int f = open(BTF,O_RDWR|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
        if (f < 0)
        {
-               PLOG(FATAL)<< "Error opening " << BTF << "\n";
+               eprintf("Error opening %s\n",BTF);
                return -1;
        }
     uint8_t buf[1024];