]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/tools/build/test/library_chain.py
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / tools / build / test / library_chain.py
index d04f465a4c05ce23b199bf9bd620d0a23dc19412..8ac2115988d11d7cb368d93e464dcd850e6b25cc 100644 (file)
@@ -10,6 +10,7 @@
 import BoostBuild
 import os
 import string
+import sys
 
 t = BoostBuild.Tester(use_test_config=False)
 
@@ -89,9 +90,9 @@ t.run_build_system(["-a", "-d+2"], status=None, stderr=None)
 # Try to find the "zzz" string either in response file (for Windows compilers),
 # or in the standard output.
 rsp = t.adjust_names("bin/$toolset/debug*/main.exe.rsp")[0]
-if os.path.exists(rsp) and ( string.find(open(rsp).read(), "zzz") != -1 ):
+if os.path.exists(rsp) and ( open(rsp).read().find("zzz") != -1 ):
     pass
-elif string.find(t.stdout(), "zzz") != -1:
+elif t.stdout().find("zzz") != -1:
     pass
 else:
     t.fail_test(1)
@@ -116,14 +117,13 @@ void a() {}
 t.run_build_system(subdir="a")
 t.expect_addition("a/dist/a.dll")
 
-if ( os.name == 'nt' or os.uname()[0].lower().startswith('cygwin') ) and \
-    BoostBuild.get_toolset() != 'gcc':
-    # This is a Windows import library -- we know the exact name.
-    file = "a/dist/a.lib"
+if sys.platform == 'win32':
+    # This is a Windows import library.
+    file = t.adjust_name("a.implib")
 else:
-    file = t.adjust_names("a/dist/a.dll")[0]
+    file = t.adjust_name("a.dll")
 
-t.write("b/jamfile.jam", "lib b : b.cpp ../%s ;" % file)
+t.write("b/jamfile.jam", "lib b : b.cpp ../a/dist/%s ;" % file)
 
 t.write("b/b.cpp", """\
 #if defined(_WIN32)