|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80085 - trunk/tools/build/v2/test
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-19 13:48:44
Author: jurko
Date: 2012-08-19 13:48:44 EDT (Sun, 19 Aug 2012)
New Revision: 80085
URL: http://svn.boost.org/trac/boost/changeset/80085
Log:
Made Boost Build's internal project_id.py test more detailed regarding registering the same project id for the same project, but with the project module specified in different ways.
Text files modified:
trunk/tools/build/v2/test/project_id.py | 85 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 81 insertions(+), 4 deletions(-)
Modified: trunk/tools/build/v2/test/project_id.py
==============================================================================
--- trunk/tools/build/v2/test/project_id.py (original)
+++ trunk/tools/build/v2/test/project_id.py 2012-08-19 13:48:44 EDT (Sun, 19 Aug 2012)
@@ -8,6 +8,7 @@
# Tests Boost Build's project-id handling.
import BoostBuild
+import sys
def test_assigning_project_ids():
@@ -103,10 +104,8 @@
t.cleanup()
-def test_repeated_ids():
+def test_repeated_ids_for_different_projects():
t = BoostBuild.Tester()
- t.write("jamroot.jam", "project foo ; project foo ;")
- t.run_build_system()
t.write("a/jamfile.jam", "")
t.write("jamroot.jam", "project foo ; use-project foo : a ;")
@@ -163,6 +162,83 @@
t.cleanup()
+def test_repeated_ids_for_same_project():
+ t = BoostBuild.Tester()
+ t.write("jamroot.jam", "project foo ; project foo ;")
+ t.run_build_system()
+
+ t.write("jamroot.jam", "project foo ; use-project foo : . ;")
+ t.run_build_system()
+
+ t.write("jamroot.jam", "project foo ; use-project foo : ./. ;")
+ t.run_build_system()
+
+ t.write("jamroot.jam", """\
+project foo ;
+use-project foo : . ;
+use-project foo : ./aaa/.. ;
+use-project foo : ./. ;
+""")
+ t.run_build_system()
+
+ t.write("bar/jamfile.jam", "")
+ t.write("jamroot.jam", """\
+use-project bar : bar ;
+use-project bar : bar/ ;
+use-project bar : bar// ;
+use-project bar : bar/// ;
+use-project bar : bar//// ;
+use-project bar : bar/. ;
+use-project bar : bar/./ ;
+use-project bar : bar/////./ ;
+use-project bar : bar/../bar/xxx/.. ;
+use-project bar : bar/..///bar/xxx///////.. ;
+use-project bar : bar/./../bar/xxx/.. ;
+use-project bar : bar/.////../bar/xxx/.. ;
+use-project bar : bar/././../bar/xxx/.. ;
+use-project bar : bar/././//////////../bar/xxx/.. ;
+use-project bar : bar/.///.////../bar/xxx/.. ;
+use-project bar : bar/./././xxx/.. ;
+use-project bar : bar/xxx////.. ;
+use-project bar : bar/xxx/.. ;
+use-project bar : bar///////xxx/.. ;
+""")
+ t.run_build_system()
+ t.rm("bar")
+
+ # On Windows we have a case-insensitive file system and we can use
+ # backslashes as path separators.
+ if sys.platform in ['cygwin', 'win32']:
+ t.write("baR/jamfile.jam", "")
+ t.write("jamroot.jam", r"""
+use-project bar : bar ;
+use-project bar : BAR ;
+use-project bar : bAr ;
+use-project bar : bAr/ ;
+use-project bar : bAr\\ ;
+use-project bar : bAr\\\\ ;
+use-project bar : bAr\\\\///// ;
+use-project bar : bAr/. ;
+use-project bar : bAr/./././ ;
+use-project bar : bAr\\.\\.\\.\\ ;
+use-project bar : bAr\\./\\/.\\.\\ ;
+use-project bar : bAr/.\\././ ;
+use-project bar : Bar ;
+use-project bar : BaR ;
+use-project bar : BaR/./../bAr/xxx/.. ;
+use-project bar : BaR/./..\\bAr\\xxx/.. ;
+use-project bar : BaR/xxx/.. ;
+use-project bar : BaR///\\\\\\//xxx/.. ;
+use-project bar : Bar\\xxx/.. ;
+use-project bar : BAR/xXx/.. ;
+use-project bar : BAR/xXx\\\\/\\/\\//\\.. ;
+""")
+ t.run_build_system()
+ t.rm("baR")
+
+ t.cleanup()
+
+
def test_unresolved_project_references():
t = BoostBuild.Tester()
@@ -317,5 +393,6 @@
test_assigning_project_ids()
test_using_project_ids_in_target_references()
-test_repeated_ids()
+test_repeated_ids_for_same_project()
+test_repeated_ids_for_different_projects()
test_unresolved_project_references()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk