test framework should probably work on all supported machines
authorCraig Dowell <craigdo@ee.washington.edu>
Sat, 12 Sep 2009 20:00:36 -0700
changeset 4773 904c1803d5dc
parent 4772 7b6ae6bf0055
child 4774 066f73df2229
test framework should probably work on all supported machines
src/core/test.h
src/core/wscript
src/devices/wifi/wscript
src/wscript
wscript
--- a/src/core/test.h	Sat Sep 12 19:44:17 2009 -0700
+++ b/src/core/test.h	Sat Sep 12 20:00:36 2009 -0700
@@ -25,6 +25,7 @@
 #include <string>
 #include <vector>
 #include <list>
+#include <limits>
 #include <sys/times.h>
 // 
 // Note on below macros:
@@ -746,7 +747,7 @@
 class TestSuite
 {
 public:
-  typedef enum TestType {
+  enum TestType {
     BVT = 1,    /**< This test suite implements a Build Verification Test */
     UNIT,       /**< This test suite implements a Unit Test */
     SYSTEM,     /**< This test suite implements a System Test */
--- a/src/core/wscript	Sat Sep 12 19:44:17 2009 -0700
+++ b/src/core/wscript	Sat Sep 12 20:00:36 2009 -0700
@@ -58,7 +58,6 @@
         'test.cc',
         'random-variable.cc',
         'rng-stream.cc',
-        'rng-test-suite.cc',
         'command-line.cc',
         'type-name.cc',
         'type-traits-test.cc',
@@ -151,3 +150,5 @@
                 'system-condition.h',
                 ])
 
+    if bld.env['ENABLE_GSL']:
+        core.source.extend(['rng-test-suite.cc'])
--- a/src/devices/wifi/wscript	Sat Sep 12 19:44:17 2009 -0700
+++ b/src/devices/wifi/wscript	Sat Sep 12 20:00:36 2009 -0700
@@ -1,12 +1,5 @@
 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 
-def configure(conf): 
-    have_gsl = conf.pkg_check_modules('GSL', 'gsl', mandatory=False)
-    conf.env['ENABLE_GSL'] = have_gsl
-    conf.report_optional_feature("GSL", "GNU Scientific Library (GSL)",
-                                 conf.env['ENABLE_GSL'],
-                                 "GSL not found")
-
 def build(bld):
     obj = bld.create_ns3_module('wifi', ['node'])
     obj.source = [
@@ -120,7 +113,6 @@
 
     if bld.env['ENABLE_GSL']:
         obj.uselib = 'GSL GSLCBLAS M'
-        obj.env.append_value('CXXDEFINES', "ENABLE_GSL")
 
     obj = bld.create_ns3_program('wifi-phy-test',
         ['core', 'simulator', 'mobility', 'node', 'wifi'])
--- a/src/wscript	Sat Sep 12 19:44:17 2009 -0700
+++ b/src/wscript	Sat Sep 12 20:00:36 2009 -0700
@@ -60,7 +60,6 @@
     conf.sub_config('core')
     conf.sub_config('simulator')
     conf.sub_config('devices/emu')
-    conf.sub_config('devices/wifi')
     conf.sub_config('devices/tap-bridge')
     conf.sub_config('contrib')
     conf.sub_config('internet-stack')
--- a/wscript	Sat Sep 12 19:44:17 2009 -0700
+++ b/wscript	Sat Sep 12 20:00:36 2009 -0700
@@ -358,8 +358,15 @@
     else:
         conf.report_optional_feature("static", "Static build", False,
                                      "option --enable-static not selected")
+    have_gsl = conf.pkg_check_modules('GSL', 'gsl', mandatory=False)
+    conf.env['ENABLE_GSL'] = have_gsl
 
-
+    conf.report_optional_feature("GSL", "GNU Scientific Library (GSL)",
+                                 conf.env['ENABLE_GSL'],
+                                 "GSL not found")
+    if have_gsl:
+        conf.env.append_value('CXXDEFINES', "ENABLE_GSL")
+        conf.env.append_value('CCDEFINES', "ENABLE_GSL")
 
     # Write a summary of optional features status
     print "---- Summary of optional NS-3 features:"