t.rm(".") t.write("Jamroot", "") t.write("a/Jamfile", """ lib a : a.cpp ; install dist : a ; """) t.write("a/a.cpp", """ #if defined(_WIN32) __declspec(dllexport) #endif 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 get_toolset() != 'gcc': file = t.adjust_names(["a/dist/a.lib"])[0] else: file = t.adjust_names(["a/dist/a.dll"])[0] t.write("b/Jamfile", """ lib b : b.cpp ../%s ; """ % file) t.write("b/b.cpp", """ #if defined(_WIN32) __declspec(dllimport) #endif void a(); #if defined(_WIN32) __declspec(dllexport)
"implicit_dependency", "example_libraries", "example_make", ] if os.name == 'posix': tests.append("symlink") # On windows, library order is not important, so skip this test # Besides, it fails ;-) # Further, the test relies on the fact that on Linux, one # can build a shared library with unresolved symbols. This is # not true on Windows (even with cygwin gcc). if string.find(os.uname()[0], "CYGWIN") == -1: tests.append("library_order") if string.find(get_toolset(), 'gcc') == 0: tests.append("gcc_runtime") if "--extras" in sys.argv: tests.append("boostbook") tests.append("example_qt4") # Requires ./whatever.py to work, so is # not guaranted to work everywhere. tests.append("example_customization") # Requires gettext tools. tests.append("example_gettext") else: print 'Note: skipping extra tests' run_tests(critical_tests, tests)
t.write("lib/project-root.jam", "") t.write("lib/Jamfile", "lib libtest_lib : test_lib.cpp ;") t.write("lib/test_lib.cpp", """ #ifdef _WIN32 __declspec(dllexport) #endif void foo() {} """); t.run_build_system(subdir="lib") t.expect_addition("lib/bin/$toolset/debug/libtest_lib.dll") # Auto adjusting of suffixes does not work, since we need to # change dll to lib. # if (os.name == 'nt' or os.uname()[0].lower().startswith('cygwin')) and get_toolset() != 'gcc': t.copy("lib/bin/$toolset/debug/libtest_lib.lib", "lib/test_lib.lib") else: t.copy("lib/bin/$toolset/debug/libtest_lib.dll", "lib/libtest_lib.dll") # Test that the simplest usage of searched library works. t.write('project-root.jam', '') t.write('Jamfile', """ import path ; import project ; local here = [ project.attribute $(__name__) location ] ; here = [ path.root $(here) [ path.pwd ] ] ;
"project_root_constants", "double_loading", "dll_path", "regression", "composite", "library_chain", "unit_test", "standalone", "expansion", "wrapper", "duplicate", "library_property", #"ordered_properties", ] if os.name == 'posix': tests.append("symlink") # On windows, library order is not important, so skip this test # Besides, it fails ;-) tests.append("library_order") if string.find(get_toolset(), 'gcc') == 0: tests.append("gcc_runtime") if os.environ.has_key('QTDIR'): tests.append("railsys") else: print 'skipping railsys test since QTDIR environment variable is unset' run_tests(critical_tests, tests)
"using", "source_locations", "out_of_tree", "notfile", ] if os.name == "posix": tests.append("symlink") # On windows, library order is not important, so skip this test # Besides, it fails ;-) # Further, the test relies on the fact that on Linux, one # can build a shared library with unresolved symbols. This is # not true on Windows (even with cygwin gcc). if string.find(os.uname()[0], "CYGWIN") == -1: tests.append("library_order") if string.find(get_toolset(), "gcc") == 0: tests.append("gcc_runtime") if os.environ.has_key("QTDIR"): tests.append("railsys") else: print "skipping railsys test since QTDIR environment variable is unset" if "--extras" in sys.argv: tests.append("boostbook") else: print "Note: skipping extra tests" run_tests(critical_tests, tests)
"example_make", "remove_requirement", "free_features_request", ] if os.name == 'posix': tests.append("symlink") # On windows, library order is not important, so skip this test # Besides, it fails ;-) # Further, the test relies on the fact that on Linux, one # can build a shared library with unresolved symbols. This is # not true on Windows (even with cygwin gcc). if string.find(os.uname()[0], "CYGWIN") == -1: tests.append("library_order") if string.find(get_toolset(), 'gcc') == 0: tests.append("gcc_runtime") if string.find(get_toolset(), 'gcc') == 0 or string.find(get_toolset(), 'msvc') == 0: tests.append("pch") if "--extras" in sys.argv: tests.append("boostbook") tests.append("example_qt4") # Requires ./whatever.py to work, so is # not guaranted to work everywhere. tests.append("example_customization") # Requires gettext tools. tests.append("example_gettext") else: