Commit Graph

32 Commits

Author SHA1 Message Date
Steven Watanabe
0d5e76ebf2 Upgrade the scanner to handle whitespace more intelligently
* The new scanner is currently disabled and only issues a warning
  for tokens that would be lexed differently.
* Special case a few common uses of ':', to limit breakage to
  a manageable level.
* Remove the horribly outdated Jambase code inherited from Perforce Jam
* Update all of Boost.Build to work in the presence of the new lexer.
2018-01-31 14:08:36 -07:00
Steven Watanabe
ee613a6a28 Implement feature relevance.
* New feature <relevant> which is automatically deduced in most cases.
* Features which are not relevant do not affect target paths and
  do not prevent merging of virtual targets.
* generators.jam: generator.run always returns usage-requirements
  to allow usage-requirements in non-top-level generators.  This
  is necessary because we're using usage-requirements to track
  relevance from flags.
* New rule toolset.uses-features to specify features that the rule
  checks manually, instead of using toolset.flags.  In the future,
  we should consider restricting the properties actually passed,
  to detect errors.
* Adjust tests to handle the new paths (verified by inspection).
* Add temporary option --ignore-relevance to consider all features relevant
  to aid migration.
* New rule property.evaluate-conditional-relevance which helps tracking
  relevance in <conditional>.
* Widely scattered changes to use the new interfaces.
2018-01-13 09:13:49 -07:00
Steven Watanabe
fa78d4fed7 Don't pass -d0, except for the tests that actually require it. Suppress global -d arguments for tests that check stdout or set -d explicitly. All tests now pass in verbose mode. 2017-12-26 13:25:40 -07: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
Jurko Gospodnetić
dff942e14b Boost Build cleanup - minor stylistic changes & comment updates.
[SVN r79733]
2012-07-25 05:15:42 +00:00
Jurko Gospodnetić
f951fb1559 Updated Boost Build's internal testing system to allow for more detailed output and file content line testing - can now test for multiple lines in sequence, with or without having other lines in between.
[SVN r79701]
2012-07-23 18:10:36 +00:00
Jurko Gospodnetić
5522e70bd8 Boost Build internal testing framework cleanup - minor stylistic changes (Python string literal quoting, line wrapping, trailing spaces, updated expected output line leading & trailing spaces to match the actual output).
[SVN r79698]
2012-07-23 16:54:18 +00:00
Jurko Gospodnetić
1082919fb8 Corrected a Boost Build bug causing it to not report an error if a generator needed to determine its target name itself when a source target passed to it as third or later did not have the same name as the first one. Added a related internal Boost Build unit test.
Caught and reported by Adder <adder.thief _at_ gmail.com>.

[SVN r79629]
2012-07-20 19:12:59 +00:00
Jurko Gospodnetić
ac6b378f22 Refactored the internal Boost Build generators-test.py test into a single Python script not depending on externally prepared files to make it easier to extend with additional tests unrelated the current one but reusing the functionality prepared for the already existing tests. Corrected a minor appender.jam comment typo in the process.
[SVN r79627]
2012-07-20 19:03:50 +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ć
6beaaefcb0 Updated the generators_test.py Boost Build test to explicitly check some conditions that were before only listed in test code comments but never explicitly tested.
[SVN r78970]
2012-06-16 02:45:09 +00:00
Jurko Gospodnetić
f33d140ee7 Reorganized the Boost Build generators-test.py test completely. Now no longer used regular OBJ, LIB & EXE target generators to avoid having to deal with specific compiler/linker features, e.g. some compilers causing test failures by returning an error code on a warning about an unexpected source file .target_cpp extension being used. Removed lots of duplication, made the test code much more readable, reviewed and cleaned up all the comments.
Broken commit - missing the appender.jam source file.

[SVN r78964]
2012-06-16 00:46:51 +00:00
Jurko Gospodnetić
f98d3aef09 Made the generators_test.py Boost Build test more detailed.
[SVN r78962]
2012-06-15 22:46:27 +00:00
Jurko Gospodnetić
5695c65f8b Extracted static/shared library testing out of the generators_test.py Boost Build test and into a separate new static_and_shared_library.py test. Updated the test a bit in the process to make it test some additional use cases.
[SVN r78961]
2012-06-15 20:17:17 +00:00
Jurko Gospodnetić
fd2c21b147 Minor stylistic changes.
[SVN r78960]
2012-06-15 19:20:21 +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
Jurko Gospodnetić
858a87c9ab Minor stylistic changes made to the Boost Build test/generators_test.py test case module.
[SVN r48310]
2008-08-23 09:08:24 +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
97e91c8e3f Tweak computation of target names from source names.
* build/generators.jam
  (generator.generated-targets): Comment the desired semantics.

* util/utility.jam
  (basename): Take the part till the last dot, not the first.


[SVN r27374]
2005-02-14 08:25:07 +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
b949771e65 Work-in-progress on better library handling.
* new/builtin.jam
  (link-action.adjust-properties): Remove.
  (linking-generator.generated-targets): Do what adjust-properties used to do.
  (linking-generator.run): Convert <library> properties to sources.
  (exe-generator): New class.


[SVN r20455]
2003-10-22 16:18:08 +00:00
Vladimir Prus
a8758e0f2c Bugfix: allow a generator to create two targets of the same type.
* new/generators.jam
  (generator.__init__): Use parallel lists to store prefixes and postfixes
  for a name, not mapping with type as a key, since type is not unique.
  (generator.generated-targets): Adjust.


[SVN r19990]
2003-09-10 07:39:45 +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
77817cb920 Making more tests work on windows.
* new/builtin.jam: The lib suffix in not "obj", even on windows.

* test/BoostBuild.py: (lib_suffix): New variable.
* test/generators_test.py: Use lib_suffix.


[SVN r16793]
2003-01-08 13:05:30 +00:00
Dave Abrahams
2dae35fbcc cleanup
[SVN r16761]
2003-01-05 18:40:55 +00:00
Dave Abrahams
5755486169 Use exe_suffix for Cygwin
[SVN r16759]
2003-01-05 18:27:05 +00:00
Vladimir Prus
149a9f83ef Improve shared/static linking interface and
introduce separate <link-runtime> feature.
Allow to use the 'lib' rule to declare
libraries that should be searched for.

* builtin.jam: Remove 'shared' features. Introduce
   'link' and 'link-runtime'.
   (searched-lib-target): New class
   (searched-lib-generator): New generator.
   (lib-action): New class, derived from 'action'.
   Handles instances of 'searched-lib-target' in sources.
   Also, moves all libraries from sources to property value,
   so that we can repeat them twice in command line.
   (lib-generator): Generator which uses 'lib-action'.

* generators.jam: Allow empty list of sources everywhere.

* virtual-target.jam (file-target): Split into
   'abstract-file-target' and 'file-target'.
   (abstra
  (action.actualize-sources): New rule. Allows to
  handle the fact that some sources are special,
  and should not become $(>) in action body.


[SVN r16573]
2002-12-09 10:02:37 +00:00
Vladimir Prus
791b5ad620 Implement variant declaration.
* builtin.jam (variant): New rule.

    * build-system.jam: Unconditionally add <toolset>gcc to build
        request. Will be fixed when toolset support is ready.

    * feature.jam (extend-feature): Bugfix.


[SVN r15678]
2002-10-03 16:29:21 +00:00
Vladimir Prus
609dd1f6ab Introduced SHARED-LIB and STATIC-LIB target types. Also introduced LIB target
type and a generator, which relays either to SHARED-LIB or STATIC-LIB,
depending of the value of "shared" feature.


[SVN r15529]
2002-09-27 07:35:03 +00:00
Vladimir Prus
e7eab4c752 Prevent creating two equivivalent virtual targets. This, in particular,
prevents complining the same source twice with the same properties.
Also allow generators to change source names using patterns.

    * new/generators.jam (generator): Accept name patterns together with
        target types.
        (generator.generated-targets): Use name patterns. Transform generated
        targets with 'virtual-targets.register', to eliminate duplicate
        virtual targets.


[SVN r15302]
2002-09-13 12:19:42 +00:00
Vladimir Prus
2796e8f328 Added generators test to the test suite.
[SVN r15269]
2002-09-11 15:56:56 +00:00