diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-12-28 17:12:41 +0100 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-12-28 17:12:41 +0100 | 
| commit | 56597a6a68e741355b301f91d5913d59cfb34eaa (patch) | |
| tree | 7531e41faf62f126984bf05b8d712f99c9520d5d /src/engine/SCons/EnvironmentTests.py | |
| parent | 56337453f0f3fbe34255e636d5d65974f4d17681 (diff) | |
New upstream version 3.1.2upstream/3.1.2upstream
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
| -rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 107 | 
1 files changed, 3 insertions, 104 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 2a1375c..139bef7 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -23,7 +23,7 @@  from __future__ import print_function -__revision__ = "src/engine/SCons/EnvironmentTests.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan" +__revision__ = "src/engine/SCons/EnvironmentTests.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"  import SCons.compat @@ -804,6 +804,7 @@ sys.exit(0)              "-iquote /usr/include/foo1 " + \              "-isystem /usr/include/foo2 " + \              "-idirafter /usr/include/foo3 " + \ +            "-imacros /usr/include/foo4 " + \              "+DD64 " + \              "-DFOO -DBAR=value -D BAZ " @@ -818,6 +819,7 @@ sys.exit(0)                                  ('-iquote', '/usr/include/foo1'),                                  ('-isystem', '/usr/include/foo2'),                                  ('-idirafter', '/usr/include/foo3'), +                                ('-imacros', env.fs.File('/usr/include/foo4')),                                  '+DD64'], repr(d['CCFLAGS'])          assert d['CXXFLAGS'] == ['-std=c++0x'], repr(d['CXXFLAGS'])          assert d['CPPDEFINES'] == ['FOO', ['BAR', 'value'], 'BAZ'], d['CPPDEFINES'] @@ -1874,18 +1876,6 @@ def generate(env):          assert ('BUILDERS' in env) is False          env2 = env.Clone() -    def test_Copy(self): -        """Test copying using the old env.Copy() method""" -        env1 = self.TestEnvironment(XXX = 'x', YYY = 'y') -        env2 = env1.Copy() -        env1copy = env1.Copy() -        assert env1copy == env1copy -        assert env2 == env2 -        env2.Replace(YYY = 'yyy') -        assert env2 == env2 -        assert env1 != env2 -        assert env1 == env1copy -      def test_Detect(self):          """Test Detect()ing tools"""          test = TestCmd.TestCmd(workdir = '') @@ -3284,44 +3274,6 @@ def generate(env):          s = e.src_builder()          assert s is None, s -    def test_SourceSignatures(self): -        """Test the SourceSignatures() method""" -        import SCons.Errors - -        env = self.TestEnvironment(M = 'MD5', T = 'timestamp') - -        exc_caught = None -        try: -            env.SourceSignatures('invalid_type') -        except SCons.Errors.UserError: -            exc_caught = 1 -        assert exc_caught, "did not catch expected UserError" - -        env.SourceSignatures('MD5') -        assert env.src_sig_type == 'MD5', env.src_sig_type - -        env.SourceSignatures('$M') -        assert env.src_sig_type == 'MD5', env.src_sig_type - -        env.SourceSignatures('timestamp') -        assert env.src_sig_type == 'timestamp', env.src_sig_type - -        env.SourceSignatures('$T') -        assert env.src_sig_type == 'timestamp', env.src_sig_type - -        try: -            import SCons.Util -            save_md5 = SCons.Util.md5 -            SCons.Util.md5 = None -            try: -                env.SourceSignatures('MD5') -            except SCons.Errors.UserError: -                pass -            else: -                self.fail('Did not catch expected UserError') -        finally: -            SCons.Util.md5 = save_md5 -      def test_Split(self):          """Test the Split() method"""          env = self.TestEnvironment(FOO = 'fff', BAR = 'bbb') @@ -3338,56 +3290,6 @@ def generate(env):          s = env.Split("$FOO$BAR")          assert s == ["fffbbb"], s -    def test_TargetSignatures(self): -        """Test the TargetSignatures() method""" -        import SCons.Errors - -        env = self.TestEnvironment(B='build', C='content') - -        exc_caught = None -        try: -            env.TargetSignatures('invalid_type') -        except SCons.Errors.UserError: -            exc_caught = 1 -        assert exc_caught, "did not catch expected UserError" -        assert not hasattr(env, '_build_signature') - -        env.TargetSignatures('build') -        assert env.tgt_sig_type == 'build', env.tgt_sig_type - -        env.TargetSignatures('$B') -        assert env.tgt_sig_type == 'build', env.tgt_sig_type - -        env.TargetSignatures('content') -        assert env.tgt_sig_type == 'content', env.tgt_sig_type - -        env.TargetSignatures('$C') -        assert env.tgt_sig_type == 'content', env.tgt_sig_type - -        env.TargetSignatures('MD5') -        assert env.tgt_sig_type == 'MD5', env.tgt_sig_type - -        env.TargetSignatures('timestamp') -        assert env.tgt_sig_type == 'timestamp', env.tgt_sig_type - -        try: -            import SCons.Util -            save_md5 = SCons.Util.md5 -            SCons.Util.md5 = None -            try: -                env.TargetSignatures('MD5') -            except SCons.Errors.UserError: -                pass -            else: -                self.fail('Did not catch expected UserError') -            try: -                env.TargetSignatures('content') -            except SCons.Errors.UserError: -                pass -            else: -                self.fail('Did not catch expected UserError') -        finally: -            SCons.Util.md5 = save_md5      def test_Value(self):          """Test creating a Value() object @@ -3408,7 +3310,6 @@ def generate(env):          assert v3.value == 'c', v3.value -      def test_Environment_global_variable(self):          """Test setting Environment variable to an Environment.Base subclass"""          class MyEnv(SCons.Environment.Base): @@ -3750,8 +3651,6 @@ class OverrideEnvironmentTestCase(unittest.TestCase,TestEnvironmentFixture):      # Environment()      # FindFile()      # Scanner() -    # SourceSignatures() -    # TargetSignatures()      # It's unlikely Clone() will ever be called this way, so let the      # other methods test that handling overridden values works.  | 
