summaryrefslogtreecommitdiff
path: root/tools/build/v2/test/symlink.py
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-10-30 12:57:26 -0700
committerAnas Nashif <anas.nashif@intel.com>2012-10-30 12:57:26 -0700
commit1a78a62555be32868418fe52f8e330c9d0f95d5a (patch)
treed3765a80e7d3b9640ec2e930743630cd6b9fce2b /tools/build/v2/test/symlink.py
downloadboost-1a78a62555be32868418fe52f8e330c9d0f95d5a.tar.gz
boost-1a78a62555be32868418fe52f8e330c9d0f95d5a.tar.bz2
boost-1a78a62555be32868418fe52f8e330c9d0f95d5a.zip
Imported Upstream version 1.49.0upstream/1.49.0
Diffstat (limited to 'tools/build/v2/test/symlink.py')
-rw-r--r--tools/build/v2/test/symlink.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/build/v2/test/symlink.py b/tools/build/v2/test/symlink.py
new file mode 100644
index 0000000000..d78e96c15f
--- /dev/null
+++ b/tools/build/v2/test/symlink.py
@@ -0,0 +1,41 @@
+#!/usr/bin/python
+
+# Copyright 2003 Dave Abrahams
+# Copyright 2003 Vladimir Prus
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Test the 'symlink' rule.
+
+import os
+import BoostBuild
+
+
+if os.name != 'posix':
+ print "The symlink tests can be run on posix only."
+ import sys
+ sys.exit(1)
+
+
+t = BoostBuild.Tester()
+
+t.write("jamroot.jam", "import gcc ;")
+
+t.write("jamfile.jam", """
+exe hello : hello.cpp ;
+symlink hello_release : hello/<variant>release ;
+symlink hello_debug : hello/<variant>debug ;
+symlink links/hello_release : hello/<variant>release ;
+""")
+
+t.write("hello.cpp", """
+int main() {}
+""")
+
+t.run_build_system()
+t.expect_addition([
+ 'hello_debug.exe',
+ 'hello_release.exe',
+ 'links/hello_release.exe'])
+
+t.cleanup()