Commit Graph

38 Commits

Author SHA1 Message Date
Rene Rivera
85e5a2caa8 Port b2 tests to dual py2 and py3.
Now that the tests work in py2 or p3 we don't set py version in AP. This
allows for dealing with the AP images that don't have a way to set the
py version.
2019-03-31 15:37:03 -05:00
Rene Rivera
40e7f0e8dd Fix tests to pass on Windows after removing toolset requirements ignore.
Various restructure of test framework handling of paths to avoid duplicate path editing which caused failed tests. Adjust many tests to deal with added subdirectories in build outputs now that toolset requirements are active.
2017-07-02 23:28:48 -05:00
Steven Watanabe
fb07490ec7 Tests that use the compiler need user-config.jam or they will fail if the toolset requires non-default initialization.
[SVN r83618]
2013-03-28 00:16:19 +00:00
Jurko Gospodnetić
343b4d6532 Updated the internal Boost Build testing system to use the Python subprocess module (introduced in Python 2.4) for running external processes instead of popen2 (deprecated since Python 2.6). We are already using Python 2.4 features in this codebase so there is no need to support Python releases older than 2.4.
Related changes:
  * BoostBuild.Tester & TestCmd.TestCmd interfaces now accept external process parameters as a list of strings, thus avoiding problems with parsing arguments containing spaces.
  * Avoided a potential process hang in case an external process being run prints out enough output to fill up the OS's pipe buffer (OS would pause the process until someone read the data from the pipe but the testing framework would not do this until the process in question had terminated).

[SVN r79448]
2012-07-12 12:55:25 +00:00
Jurko Gospodnetić
c5e5b5324e Boost Build cleanup - minor stylistic internal Boost Build test script & testing system changes.
[SVN r79445]
2012-07-12 12:22:14 +00:00
Vladimir Prus
67cb81915b Remove unused bits
[SVN r64613]
2010-08-05 09:11:17 +00:00
Vladimir Prus
707aca5155 Somewhat fix searched libraries.
[SVN r64554]
2010-08-02 21:27:33 +00:00
Vladimir Prus
2a5d05b79a More diagnostics for tests that fail on OSX.
[SVN r55865]
2009-08-29 13:34:09 +00:00
Jurko Gospodnetić
677aefd23b Minor stylistic changes in several Boost Build unit tests.
[SVN r48589]
2008-09-04 23:12:25 +00:00
Jurko Gospodnetić
f20f88b91d Renamed differently named Jamroot and Jamfile files throughout Boost Build's test suite to jamroot.jam & jamfile.jam. Stylistic changes throughout the whole Boost Build test suite.
[SVN r48504]
2008-08-31 21:42:27 +00:00
Vladimir Prus
eb1a8a77d0 Make the Tester.copy method open files in binary mode.
This fixes the searched_lib.py failure on Windows.

Patch from Jurko Gospodnetic.


[SVN r42301]
2007-12-25 09:43:44 +00:00
Vladimir Prus
2eb44eeb35 Attemp to fix searched_lib on windows
[SVN r39831]
2007-10-09 06:37:00 +00:00
Rene Rivera
602b6d8b13 Add/update copyrights+license (with help of a shell script).
[SVN r35856]
2006-11-05 18:13:42 +00:00
Vladimir Prus
f78581a75e Windows fixes
[SVN r33809]
2006-04-25 13:45:30 +00:00
Vladimir Prus
b48dc6225f Test that 'unit-test' will find searched libraries.
[SVN r33624]
2006-04-10 07:29:30 +00:00
Vladimir Prus
24fa408e3f Unbreak " lib a ; " syntax.
Thanks to Craig Rodrigues for the bug report.


[SVN r30309]
2005-07-29 12:00:40 +00:00
Vladimir Prus
fa7edfe511 Automatically prepend "lib" prefix to LIB targets on Unix.
[SVN r29602]
2005-06-16 07:24:16 +00:00
Vladimir Prus
43994ac2eb Rename link-runtime to runtime-link to stay compatible with V1.
[SVN r29586]
2005-06-15 12:24:06 +00:00
Vladimir Prus
5a44f04da8 Refactor generators a bit.
* If a generator was given a source it could not handle, it used to return
  that source together with generated targets. This was nice for some use
  cases, but no very nice for others, and this behaviour could not be turned
  off. One use case where it worked bad was:

      lib plugin : plugin.cpp helper ;
      lib helper : helper.cpp ;

  On windows, 'plugin' would link to the 'import library' and pass the DLL
  target though. So, when installing 'plugin', we'd also install 'helper.dll',
  and it was not possible to do anything about it.

* If we asked generators.construct to produce sources of type CPP,
  and the selected generator produced both targets of type CPP, and of
  some other type, we'd try again to convert those other targets to CPP.
  This simply complicated the logic for no good reason.

* Most generator function had 'multiple' parameter, which function
  was long forgotten by anybody.

As a bit of history, I believe some of the above decisions were due to a
certain use case:

          CPP <------- WHL
                          \
                            WD
                          /
          CPP <------- DLP

Here, a source file is converted to two targets with one command, and each
produced file is converted to CPP. Our generators search would notice that
there are two generators for CPP: the WHL->CPP and DPL->CPP
generators. Neither is better that the other so both are tried, and produce
(CPP, DPL) and (CPP, WHL) pairs of targets. To avoid reporting an ambiguity,
we'd try to convert, DLP to CPP and WHL to CPP, do it successfully, notice
that produced targets are the same and decide that there's no ambiguity.

However, this is rather complex logic for a relatively rare case. It can
be handled by writing another WD->CPP generator that would handle
disambiguation itself.

This commit has one user-visible change. The code:

  exe a : a.cpp b ;
  obj b : b.cpp helper;
  lib helper ;

No longer works -- the 'a' target won't link to 'helper'. However, this is
pretty stange code and worked before almost by accident.


[SVN r29361]
2005-06-02 06:43:56 +00:00
Vladimir Prus
5ec008ddbc Bugfix: searched library was not found when
exe depended on obj and obj depended on a searched library.

Thanks to Caleb Epstein for the bug report.

* tools/builtin.jam
  (searched-lib-generator.extra-usage-requirements): Remove
  (archive-generator.run): Don't bother passing 'library-path' properties.
  (linking-generator.run): Add propery library-path properties for
    searched libraries.

* tools/unix.jam: Induced changes.

* test/searched_lib.py: New test.


[SVN r26486]
2004-12-10 10:17:56 +00:00
Vladimir Prus
834d66a456 Fix the <link-runtime>static property on gcc.
[SVN r24665]
2004-08-23 12:40:23 +00:00
Vladimir Prus
1baab343b9 Unbreak searched_lib.py and library_chain.py. Pass proper -rpath-link
options to the linker.

* tools/builtin.jam
  (lib-target-class.compute-usage-requirements): Add xdll-path
  properties instead of dll-path. Add them unconditionally,
  not only when hardcode-dll-paths is true.

  (linking-generator.run): When hardcode-dll-paths is true, add
  dll-path property for each xdll-path property.

* tools/gcc.jam
  Convert xdll-path properties into -rpath-link option.


[SVN r21560]
2004-01-09 10:50:07 +00:00
Vladimir Prus
20c1e93a40 Fix a bug with searched libraries. When they are bypassed by static library,
we need to bypass <library-path> property, as well.

* tools/builtin.jam
  (lib-target-class.compute-usage-requirements): The above change.

* build/virtual-target.jam
  (subvariant.set-usage-requirements, subvariant.usege-requirements):
      New methods.
  (abstract-file-target.dg): Don't allow changing the value.

* build/targets.jam
  (basic-target.generate): Explicitly don't change value of 'dg'.


[SVN r20655]
2003-11-04 17:14:29 +00:00
Vladimir Prus
b2b6e2769b Simplify target paths.
* build/targets.jam
  (project-target.reference-properties): Remove.

* build/virtual-target.jam
  (abstract-file-target.specific-main-target,
   file-target.specific-main-target): Remove.


[SVN r20516]
2003-10-28 07:46:40 +00:00
Vladimir Prus
be258d889a Remove support for old-style target ids.
[SVN r19913]
2003-09-04 11:06:14 +00:00
Vladimir Prus
eb5d60e764 Make searched targets really work on borland.
* new/builtin.jam
  (lib-generator): Remove.
  (lib-target-class): New class. Target class is more powerfull then
  generator, here.

* new/generators.jam
  (construct): New argument 'return-all'.

* bew/property-set.jam
  (property-set.add-raw): New method.


[SVN r18917]
2003-07-02 12:23:50 +00:00
Vladimir Prus
c2abccc7de Bugfix: make searched libraries really work on borland.
[SVN r18867]
2003-06-24 12:43:11 +00:00
Vladimir Prus
21bb325dcc Bugfix: don't create duplicate virtual targets for searched lib with
the same properties. Thanks to Andre Hentz for finding this bug and
providing the test case.

* new/builtin.jam
  (searched-lib-generator.run): Pass the result through
  'virtual-target.register'.

* test/searched_lib.py: Add new test.


[SVN r18247]
2003-04-14 05:51:06 +00:00
Vladimir Prus
e825755eed Fix a bug introduces in 1.8 which broke gcc tests. Do not think that import
libraries are used with gcc, even on NT. The previos version assumed that
import libraries are always used on NT.


[SVN r18230]
2003-04-11 06:31:14 +00:00
Vladimir Prus
b1f7b4f34d Patch from Andre Hentz to fix os=cygwin/toolset=msvc combination.
* new/builtin.jam: Associate obj and lib extension with OBJ and
STATIC_LIB target types, to handle the above combination. The gcc
toolset overrides these extension explicitly.

* new/msvc.jam
   (archive): Use bash syntax on cygwin.


[SVN r18210]
2003-04-08 14:14:53 +00:00
Vladimir Prus
394043114a Win32 fixes.
[SVN r18182]
2003-04-04 08:00:42 +00:00
Vladimir Prus
5b79cb74ed Patch from Andre Hentz.
* new/builtin.jam
  - register builtin.response-generator with 'register-linker', to
    take advantange of 'link-action'. Convert <library-path>,
    <find-static-library> and <find-shared-library> into on-target
    variables using toolset.flags.
  (builtin.response-file) Output variables for library path to response
    file.
  (searched-lib-generator.run): Assign 'null-action' instance to the
  generated target, to carry properties. Correct prototype and workaround
  some, as-yet-unknown problem.

* test/searched_lib.py: New test (added by me).


[SVN r18121]
2003-03-28 09:20:58 +00:00
Dave Abrahams
09d88e1f8e Fixes for testing
[SVN r17642]
2003-02-25 14:37:10 +00:00
Vladimir Prus
e017ca640f Towards really cross-toolset testing system.
- Allow to specify toolset name on the command line
- Expand $toolset in paths
- Pass toolset name to bjam invocations.


[SVN r17555]
2003-02-20 13:08:51 +00:00
Vladimir Prus
2f58129645 Automatically adjust suffixes when running tests.
[SVN r17505]
2003-02-18 08:32:57 +00:00
Vladimir Prus
95d4da2990 Don't link to -lz and assume it's existence: build a private library
for testing. Also, test both <name> and <search> in one test.


[SVN r17503]
2003-02-18 06:56:12 +00:00
Vladimir Prus
846928e81a Bugfix: <search> property on searched lib targets was ignored.
[SVN r17477]
2003-02-17 08:32:45 +00:00
Vladimir Prus
601764adff Bugfix: now search-lib targets can be used in requirements and
usage-requirements.

* new/builtin.jam
    (link-action.adjust-properties): Rework.

* test/searched_lib.py: New test.


[SVN r17104]
2003-01-31 09:26:25 +00:00