diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2020-03-10 18:10:42 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2020-03-10 18:10:42 +0000 |
commit | f36f0f2461a7f0447e92f977ff9c0c71fcb08ffb (patch) | |
tree | acbe2e5f719dd6b81312be0b03762013b68505d2 /test | |
parent | 810b8dbb6798bd8ddcbafae7ecd9e5ee535c92f4 (diff) | |
download | unit-f36f0f2461a7f0447e92f977ff9c0c71fcb08ffb.tar.gz unit-f36f0f2461a7f0447e92f977ff9c0c71fcb08ffb.tar.bz2 |
Tests: redirect tests output to the stdout.
Diffstat (limited to 'test')
-rwxr-xr-x | test/run.py | 2 | ||||
-rw-r--r-- | test/test_access_log.py | 1 | ||||
-rw-r--r-- | test/test_tls.py | 18 | ||||
-rw-r--r-- | test/unit/applications/lang/go.py | 5 | ||||
-rw-r--r-- | test/unit/applications/lang/java.py | 4 | ||||
-rw-r--r-- | test/unit/applications/tls.py | 3 |
6 files changed, 20 insertions, 13 deletions
diff --git a/test/run.py b/test/run.py index b79d0484..59e06bcb 100755 --- a/test/run.py +++ b/test/run.py @@ -12,7 +12,7 @@ if __name__ == '__main__': tests = loader.discover(start_dir=this_dir) suite.addTests(tests) - runner = unittest.TextTestRunner(verbosity=3) + runner = unittest.TextTestRunner(stream=sys.stdout, verbosity=3) result = runner.run(suite) ret = not (len(result.failures) == len(result.errors) == 0) diff --git a/test/test_access_log.py b/test/test_access_log.py index 94f6e7bf..898d8b24 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -2,7 +2,6 @@ import os import re import time import unittest -from subprocess import call from unit.applications.lang.python import TestApplicationPython diff --git a/test/test_tls.py b/test/test_tls.py index 1ead111c..475e9919 100644 --- a/test/test_tls.py +++ b/test/test_tls.py @@ -157,7 +157,8 @@ class TestTLS(TestApplicationTLS): '-genkey', '-out', self.testdir + '/ec.key', '-name', 'prime256v1', - ] + ], + stderr=subprocess.STDOUT, ) subprocess.call( @@ -170,7 +171,8 @@ class TestTLS(TestApplicationTLS): '-config', self.testdir + '/openssl.conf', '-key', self.testdir + '/ec.key', '-out', self.testdir + '/ec.crt', - ] + ], + stderr=subprocess.STDOUT, ) self.certificate_load('ec') @@ -230,7 +232,8 @@ class TestTLS(TestApplicationTLS): '-config', self.testdir + '/openssl.conf', '-out', self.testdir + '/int.csr', '-keyout', self.testdir + '/int.key', - ] + ], + stderr=subprocess.STDOUT, ) subprocess.call( @@ -242,7 +245,8 @@ class TestTLS(TestApplicationTLS): '-config', self.testdir + '/openssl.conf', '-out', self.testdir + '/end.csr', '-keyout', self.testdir + '/end.key', - ] + ], + stderr=subprocess.STDOUT, ) with open(self.testdir + '/ca.conf', 'w') as f: @@ -288,7 +292,8 @@ basicConstraints = critical,CA:TRUE""" '-cert', self.testdir + '/root.crt', '-in', self.testdir + '/int.csr', '-out', self.testdir + '/int.crt', - ] + ], + stderr=subprocess.STDOUT, ) subprocess.call( @@ -302,7 +307,8 @@ basicConstraints = critical,CA:TRUE""" '-cert', self.testdir + '/int.crt', '-in', self.testdir + '/end.csr', '-out', self.testdir + '/end.crt', - ] + ], + stderr=subprocess.STDOUT, ) crt_path = self.testdir + '/end-int.crt' diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py index 7212a95c..e0f83c0a 100644 --- a/test/unit/applications/lang/go.py +++ b/test/unit/applications/lang/go.py @@ -1,5 +1,5 @@ import os -from subprocess import Popen +import subprocess from unit.applications.proto import TestApplicationProto @@ -26,7 +26,7 @@ class TestApplicationGo(TestApplicationProto): env['GOPATH'] = self.pardir + '/build/go' try: - process = Popen( + process = subprocess.Popen( [ 'go', 'build', @@ -35,6 +35,7 @@ class TestApplicationGo(TestApplicationProto): self.current_dir + '/go/' + script + '/' + name + '.go', ], env=env, + stderr=subprocess.STDOUT, ) process.communicate() diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py index a370d96b..a8a09ce5 100644 --- a/test/unit/applications/lang/java.py +++ b/test/unit/applications/lang/java.py @@ -1,7 +1,7 @@ import os import glob import shutil -from subprocess import Popen +import subprocess from unit.applications.proto import TestApplicationProto @@ -64,7 +64,7 @@ class TestApplicationJava(TestApplicationProto): javac.extend(src) try: - process = Popen(javac) + process = subprocess.Popen(javac, stderr=subprocess.STDOUT) process.communicate() except: diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py index 1290279d..9213974a 100644 --- a/test/unit/applications/tls.py +++ b/test/unit/applications/tls.py @@ -47,7 +47,8 @@ class TestApplicationTLS(TestApplicationProto): '-config', self.testdir + '/openssl.conf', '-out', self.testdir + '/' + name + '.crt', '-keyout', self.testdir + '/' + name + '.key', - ] + ], + stderr=subprocess.STDOUT, ) if load: |