[Xorp-hackers] scons question

Ben Greear greearb at candelatech.com
Tue Apr 27 11:05:51 PDT 2010


I'm having troubles getting the bgp harness to pass 'scons check' properly.

I have code like this in bgp/harness/SConscript

if 'check' in COMMAND_LINE_TARGETS:
     for ss in script_srcs:
         env.Alias('check', env.Execute(Copy('%s' % ss, '../../../../bgp/harness/%s' %ss)))

     # Tests to run automatically with 'scons test'
     env.Alias('check', env.Execute(env.Action('./test_peering1.sh')))
     env.Alias('check', env.Execute(env.Action('./test_peering2.sh')))
     env.Alias('check', env.Execute(env.Action('./test_peering3.sh')))
     env.Alias('check', env.Execute(env.Action('./test_routing1.sh')))
     env.Alias('check', env.Execute(env.Action('./test_routing2.sh')))
     env.Alias('check', env.Execute(env.Action('./test_rib1.sh')))
     env.Alias('check', env.Execute(env.Action('./test_rib_fea1.sh')))
     env.Alias('check', env.Execute(env.Action('./test_path_attribute1.sh')))
     env.Alias('check', env.Execute(env.Action('./test_path_attribute2.sh')))
     env.Alias('check', env.Execute(env.Action('./test_path_attribute3.sh')))
     env.Alias('check', env.Execute(env.Action('./test_route_reflection1.sh')))
     env.Alias('check', env.Execute(env.Action('./test_route_reflection2.sh')))
     env.Alias('check', env.Execute(env.Action('./test_route_flap_damping1.sh')))
     env.Alias('check', env.Execute(env.Action('./test_terminate.sh')))

This all seems to work fine, as far as running the tests go.

But, then, scons throws a strange error:

...
[ 2010/04/27 10:48:33.821139 INFO xorp_bgp BGP ] EVENT: timers 3
[ 2010/04/27 10:48:33.821177 INFO xorp_bgp BGP ] xrl router still has pending operations
[ 2010/04/27 10:48:33.821192 INFO xorp_bgp BGP ] xrl router no more pending operations

******************* Command:     ../xorp_bgp         exited status: 0 10585
[ 2010/04/27 10:48:33.823299 WARNING xorp_finder LIBXORP ] read error: _fd: 17  offset: 0  total-len: 4 error: Connection reset by peer
./test_terminate.sh: Tests Succeeded
SIGTERM received. Exiting.
Leaving ./test_terminate.sh   -l -t test2

scons: warning: Two different environments were specified for target aspath.os,
	but they appear to have the same action: $SHCXX -o $TARGET -c $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES
File "/home/greearb/git/svn-xorp/dev-xorp/xorp.ct/bgp/SConscript", line 135, in <module>
scons: done reading SConscript files.
scons: Building targets ...
scons: *** [check] AttributeError : 'int' object has no attribute 'get_csig'
scons: building terminated because of errors.


line 135 of the bgp/SConscript is *THIS*:

if is_shared:
     libxorp_bgp = bgp_env.SharedLibrary(target = 'libxorp_bgp',
                                         source = libxorp_bgp_srcs,
  *THIS*                                       LIBS = '')

     if bgp_env['rtld_origin']:
         for obj in libxorp_bgp:
             bgp_env.AddPostAction(libxorp_bgp,
                 bgp_env.Symlink(obj.abspath,
                                 os.path.join(bgp_env['xorp_alias_libdir'], str(obj))))
else:
     libxorp_ospf = bgp_env.StaticLibrary(target = 'libxorp_bgp',
                                          source = libxorp_bgp_srcs,
                                          LIBS = '')


Anyone know what might be causing this error, or suggestions for improving the
bgp/harness scons logic?

Thanks,
Ben


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list