diff options
author | William Deegan <bill@baddogconsulting.com> | 2020-10-07 22:09:32 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2020-10-07 22:09:32 (GMT) |
commit | c014008bfa4db6a5266e94a725fd1b983f837931 (patch) | |
tree | 62455522d9892ccbec02f5fb78673e3781c2129c /test | |
parent | 4c3cc667056cec3b8841840f01be908531460a3c (diff) | |
download | SCons-c014008bfa4db6a5266e94a725fd1b983f837931.zip SCons-c014008bfa4db6a5266e94a725fd1b983f837931.tar.gz SCons-c014008bfa4db6a5266e94a725fd1b983f837931.tar.bz2 |
incremental checkin. Updates to README for other developers to review
Diffstat (limited to 'test')
-rw-r--r-- | test/LINK/SHLIBVERSIONFLAGS.py | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/test/LINK/SHLIBVERSIONFLAGS.py b/test/LINK/SHLIBVERSIONFLAGS.py index 6cf7290..7bcabf0 100644 --- a/test/LINK/SHLIBVERSIONFLAGS.py +++ b/test/LINK/SHLIBVERSIONFLAGS.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -# __COPYRIGHT__ +# MIT License +# +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -22,10 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -import os -import re import TestSCons import SCons.Platform @@ -69,15 +68,35 @@ test.write('SConstruct', "SharedLibrary('foo','foo.c',SHLIBVERSION='1.2.3')\n") test.run(stdout = versionflags, match = TestSCons.match_re_dotall) test.run(arguments = ['-c']) -# stdout must contain SHLIBVERSIONFLAGS if there is SHLIBVERSION provided +# stdout must contain SONAME if there is SONAME provided test = TestSCons.TestSCons() test.write('foo.c', foo_c_src) test.write('SConstruct', """ SharedLibrary('foo','foo.c',SHLIBVERSION='1.2.3',SONAME='%s') """ % soname) test.run(stdout = sonameVersionFlags, match = TestSCons.match_re_dotall) +test.must_exist(test.workpath(soname)) test.run(arguments = ['-c']) +# stdout must contain SOVERSION if there is SOVERSION provided +test = TestSCons.TestSCons() +test.write('foo.c', foo_c_src) +test.write('SConstruct', """ +SharedLibrary('foo','foo.c',SHLIBVERSION='1.2.3',SOVERSION='4') +""") +test.run(stdout = sonameVersionFlags, match = TestSCons.match_re_dotall) +test.must_exist(test.workpath(soname)) +test.run(arguments = ['-c']) + +# test if both SONAME and SOVERSION are used +test = TestSCons.TestSCons() +test.write('foo.c', foo_c_src) +test.write('SConstruct', """ +SharedLibrary('foo','foo.c',SHLIBVERSION='1.2.3',SONAME='%s',SOVERSION='4') +""" % soname) +test.run(status=2,stderr=None) +test.must_contain_all_lines(test.stderr(), ['Ambiguous library .so naming']) + test.pass_test() # Local Variables: |