test framework should probably work on all supported machines
authorCraig Dowell <craigdo@ee.washington.edu>
Sat Sep 12 20:00:36 2009 -0700 (4 months ago)
changeset 4773904c1803d5dc
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
     1.1 --- a/src/core/test.h	Sat Sep 12 19:44:17 2009 -0700
     1.2 +++ b/src/core/test.h	Sat Sep 12 20:00:36 2009 -0700
     1.3 @@ -25,6 +25,7 @@
     1.4  #include <string>
     1.5  #include <vector>
     1.6  #include <list>
     1.7 +#include <limits>
     1.8  #include <sys/times.h>
     1.9  // 
    1.10  // Note on below macros:
    1.11 @@ -746,7 +747,7 @@
    1.12  class TestSuite
    1.13  {
    1.14  public:
    1.15 -  typedef enum TestType {
    1.16 +  enum TestType {
    1.17      BVT = 1,    /**< This test suite implements a Build Verification Test */
    1.18      UNIT,       /**< This test suite implements a Unit Test */
    1.19      SYSTEM,     /**< This test suite implements a System Test */
     2.1 --- a/src/core/wscript	Sat Sep 12 19:44:17 2009 -0700
     2.2 +++ b/src/core/wscript	Sat Sep 12 20:00:36 2009 -0700
     2.3 @@ -58,7 +58,6 @@
     2.4          'test.cc',
     2.5          'random-variable.cc',
     2.6          'rng-stream.cc',
     2.7 -        'rng-test-suite.cc',
     2.8          'command-line.cc',
     2.9          'type-name.cc',
    2.10          'type-traits-test.cc',
    2.11 @@ -151,3 +150,5 @@
    2.12                  'system-condition.h',
    2.13                  ])
    2.14  
    2.15 +    if bld.env['ENABLE_GSL']:
    2.16 +        core.source.extend(['rng-test-suite.cc'])
     3.1 --- a/src/devices/wifi/wscript	Sat Sep 12 19:44:17 2009 -0700
     3.2 +++ b/src/devices/wifi/wscript	Sat Sep 12 20:00:36 2009 -0700
     3.3 @@ -1,12 +1,5 @@
     3.4  ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     3.5  
     3.6 -def configure(conf): 
     3.7 -    have_gsl = conf.pkg_check_modules('GSL', 'gsl', mandatory=False)
     3.8 -    conf.env['ENABLE_GSL'] = have_gsl
     3.9 -    conf.report_optional_feature("GSL", "GNU Scientific Library (GSL)",
    3.10 -                                 conf.env['ENABLE_GSL'],
    3.11 -                                 "GSL not found")
    3.12 -
    3.13  def build(bld):
    3.14      obj = bld.create_ns3_module('wifi', ['node'])
    3.15      obj.source = [
    3.16 @@ -120,7 +113,6 @@
    3.17  
    3.18      if bld.env['ENABLE_GSL']:
    3.19          obj.uselib = 'GSL GSLCBLAS M'
    3.20 -        obj.env.append_value('CXXDEFINES', "ENABLE_GSL")
    3.21  
    3.22      obj = bld.create_ns3_program('wifi-phy-test',
    3.23          ['core', 'simulator', 'mobility', 'node', 'wifi'])
     4.1 --- a/src/wscript	Sat Sep 12 19:44:17 2009 -0700
     4.2 +++ b/src/wscript	Sat Sep 12 20:00:36 2009 -0700
     4.3 @@ -60,7 +60,6 @@
     4.4      conf.sub_config('core')
     4.5      conf.sub_config('simulator')
     4.6      conf.sub_config('devices/emu')
     4.7 -    conf.sub_config('devices/wifi')
     4.8      conf.sub_config('devices/tap-bridge')
     4.9      conf.sub_config('contrib')
    4.10      conf.sub_config('internet-stack')
     5.1 --- a/wscript	Sat Sep 12 19:44:17 2009 -0700
     5.2 +++ b/wscript	Sat Sep 12 20:00:36 2009 -0700
     5.3 @@ -358,8 +358,15 @@
     5.4      else:
     5.5          conf.report_optional_feature("static", "Static build", False,
     5.6                                       "option --enable-static not selected")
     5.7 +    have_gsl = conf.pkg_check_modules('GSL', 'gsl', mandatory=False)
     5.8 +    conf.env['ENABLE_GSL'] = have_gsl
     5.9  
    5.10 -
    5.11 +    conf.report_optional_feature("GSL", "GNU Scientific Library (GSL)",
    5.12 +                                 conf.env['ENABLE_GSL'],
    5.13 +                                 "GSL not found")
    5.14 +    if have_gsl:
    5.15 +        conf.env.append_value('CXXDEFINES', "ENABLE_GSL")
    5.16 +        conf.env.append_value('CCDEFINES', "ENABLE_GSL")
    5.17  
    5.18      # Write a summary of optional features status
    5.19      print "---- Summary of optional NS-3 features:"