From 1b54b04a80618be03001274f3ea75a2fdfb9a6e9 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 2 Jul 2017 19:06:33 +0100 Subject: Amend the test file names to remove + symbols from file names. --- test/Clang/clang++_default_environment.py | 64 -------------------------- test/Clang/clang++_shared_library.py | 72 ------------------------------ test/Clang/clang++_specific_environment.py | 60 ------------------------- test/Clang/clang++_static_library.py | 56 ----------------------- test/Clang/clangxx_default_environment.py | 64 ++++++++++++++++++++++++++ test/Clang/clangxx_shared_library.py | 72 ++++++++++++++++++++++++++++++ test/Clang/clangxx_specific_environment.py | 60 +++++++++++++++++++++++++ test/Clang/clangxx_static_library.py | 56 +++++++++++++++++++++++ 8 files changed, 252 insertions(+), 252 deletions(-) delete mode 100644 test/Clang/clang++_default_environment.py delete mode 100644 test/Clang/clang++_shared_library.py delete mode 100644 test/Clang/clang++_specific_environment.py delete mode 100644 test/Clang/clang++_static_library.py create mode 100644 test/Clang/clangxx_default_environment.py create mode 100644 test/Clang/clangxx_shared_library.py create mode 100644 test/Clang/clangxx_specific_environment.py create mode 100644 test/Clang/clangxx_static_library.py diff --git a/test/Clang/clang++_default_environment.py b/test/Clang/clang++_default_environment.py deleted file mode 100644 index beef1e5..0000000 --- a/test/Clang/clang++_default_environment.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import TestSCons - -_exe = TestSCons._exe -test = TestSCons.TestSCons() - -if not test.where_is('clang'): - test.skip_test("Could not find 'clang++', skipping test.\n") - -## This will likely NOT use clang++. - -test.write('SConstruct', """\ -env = Environment() -if env['CXX'] != 'clang++': - env['CXX'] = 'clang++' -env.Program('foo.cpp') -""") - -test.write('foo.cpp', """\ -#include -int main(int argc, char ** argv) { - std::cout << "Hello!" << std::endl; - return 0; -} -""") - -test.run() - -test.run(program=test.workpath('foo'+_exe)) - -test.fail_test(not test.stdout() == 'Hello!\n') - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Clang/clang++_shared_library.py b/test/Clang/clang++_shared_library.py deleted file mode 100644 index d6337ba..0000000 --- a/test/Clang/clang++_shared_library.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import TestSCons - -from SCons.Environment import Base - -_exe = TestSCons._exe -test = TestSCons.TestSCons() - -if not test.where_is('clang'): - test.skip_test("Could not find 'clang++', skipping test.\n") - -platform = Base()['PLATFORM'] -if platform == 'posix': - filename = 'foo.os' - libraryname = 'libfoo.so' -elif platform == 'darwin': - filename = 'foo.os' - libraryname = 'libfoo.dylib' -elif platform == 'win32': - filename = 'foo.obj' - libraryname = 'foo.dll' -else: - test.fail_test() - -test.write('SConstruct', """\ -env = Environment(tools=['clang++', 'link']) -env.SharedLibrary('foo', 'foo.cpp') -""") - -test.write('foo.cpp', """\ -int bar() { - return 42; -} -""") - -test.run() - -test.must_exist(test.workpath(filename)) -test.must_exist(test.workpath(libraryname)) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Clang/clang++_specific_environment.py b/test/Clang/clang++_specific_environment.py deleted file mode 100644 index 773fa94..0000000 --- a/test/Clang/clang++_specific_environment.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import TestSCons - -_exe = TestSCons._exe -test = TestSCons.TestSCons() - -if not test.where_is('clang'): - test.skip_test("Could not find 'clang++', skipping test.\n") - -test.write('SConstruct', """\ -env = Environment(tools=['clang++', 'link']) -env.Program('foo.cpp') -""") - -test.write('foo.cpp', """\ -#include -int main(int argc, char ** argv) { - std::cout << "Hello!" << std::endl; - return 0; -} -""") - -test.run() - -test.run(program=test.workpath('foo'+_exe)) - -test.fail_test(not test.stdout() == 'Hello!\n') - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Clang/clang++_static_library.py b/test/Clang/clang++_static_library.py deleted file mode 100644 index 77ea58e..0000000 --- a/test/Clang/clang++_static_library.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python -# -# __COPYRIGHT__ -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import TestSCons - -_exe = TestSCons._exe -test = TestSCons.TestSCons() - -if not test.where_is('clang'): - test.skip_test("Could not find 'clang++', skipping test.\n") - -test.write('SConstruct', """\ -env = Environment(tools=['clang++', 'ar']) -env.StaticLibrary('foo', 'foo.cpp') -""") - -test.write('foo.cpp', """\ -int bar() { - return 42; -} -""") - -test.run() - -test.must_exist(test.workpath('libfoo.a')) - -test.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Clang/clangxx_default_environment.py b/test/Clang/clangxx_default_environment.py new file mode 100644 index 0000000..beef1e5 --- /dev/null +++ b/test/Clang/clangxx_default_environment.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons + +_exe = TestSCons._exe +test = TestSCons.TestSCons() + +if not test.where_is('clang'): + test.skip_test("Could not find 'clang++', skipping test.\n") + +## This will likely NOT use clang++. + +test.write('SConstruct', """\ +env = Environment() +if env['CXX'] != 'clang++': + env['CXX'] = 'clang++' +env.Program('foo.cpp') +""") + +test.write('foo.cpp', """\ +#include +int main(int argc, char ** argv) { + std::cout << "Hello!" << std::endl; + return 0; +} +""") + +test.run() + +test.run(program=test.workpath('foo'+_exe)) + +test.fail_test(not test.stdout() == 'Hello!\n') + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Clang/clangxx_shared_library.py b/test/Clang/clangxx_shared_library.py new file mode 100644 index 0000000..d6337ba --- /dev/null +++ b/test/Clang/clangxx_shared_library.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons + +from SCons.Environment import Base + +_exe = TestSCons._exe +test = TestSCons.TestSCons() + +if not test.where_is('clang'): + test.skip_test("Could not find 'clang++', skipping test.\n") + +platform = Base()['PLATFORM'] +if platform == 'posix': + filename = 'foo.os' + libraryname = 'libfoo.so' +elif platform == 'darwin': + filename = 'foo.os' + libraryname = 'libfoo.dylib' +elif platform == 'win32': + filename = 'foo.obj' + libraryname = 'foo.dll' +else: + test.fail_test() + +test.write('SConstruct', """\ +env = Environment(tools=['clang++', 'link']) +env.SharedLibrary('foo', 'foo.cpp') +""") + +test.write('foo.cpp', """\ +int bar() { + return 42; +} +""") + +test.run() + +test.must_exist(test.workpath(filename)) +test.must_exist(test.workpath(libraryname)) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Clang/clangxx_specific_environment.py b/test/Clang/clangxx_specific_environment.py new file mode 100644 index 0000000..773fa94 --- /dev/null +++ b/test/Clang/clangxx_specific_environment.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons + +_exe = TestSCons._exe +test = TestSCons.TestSCons() + +if not test.where_is('clang'): + test.skip_test("Could not find 'clang++', skipping test.\n") + +test.write('SConstruct', """\ +env = Environment(tools=['clang++', 'link']) +env.Program('foo.cpp') +""") + +test.write('foo.cpp', """\ +#include +int main(int argc, char ** argv) { + std::cout << "Hello!" << std::endl; + return 0; +} +""") + +test.run() + +test.run(program=test.workpath('foo'+_exe)) + +test.fail_test(not test.stdout() == 'Hello!\n') + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/Clang/clangxx_static_library.py b/test/Clang/clangxx_static_library.py new file mode 100644 index 0000000..77ea58e --- /dev/null +++ b/test/Clang/clangxx_static_library.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons + +_exe = TestSCons._exe +test = TestSCons.TestSCons() + +if not test.where_is('clang'): + test.skip_test("Could not find 'clang++', skipping test.\n") + +test.write('SConstruct', """\ +env = Environment(tools=['clang++', 'ar']) +env.StaticLibrary('foo', 'foo.cpp') +""") + +test.write('foo.cpp', """\ +int bar() { + return 42; +} +""") + +test.run() + +test.must_exist(test.workpath('libfoo.a')) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: -- cgit v0.12