From fc90bf0d1adbfe4e8e00d1fe16aa7079f5ae8bdb Mon Sep 17 00:00:00 2001 From: "mulin.lyh" Date: Tue, 26 Jul 2022 10:57:16 +0800 Subject: [PATCH] [to #43554786]fix: test error is not detected in gate test, protobuf version to (3, 3.21.0) for tensorflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 限制protobuf版本,修复单元测试有error返回值为0问题 Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/9510263 * fix test error is not detected in gate test, protobuf version to (3, 3.21.0) --- requirements/audio.txt | 4 ++-- requirements/runtime.txt | 2 -- tests/run.py | 4 +++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/audio.txt b/requirements/audio.txt index e3d50b57..f0fdb054 100644 --- a/requirements/audio.txt +++ b/requirements/audio.txt @@ -9,8 +9,8 @@ lxml matplotlib nara_wpe numpy<=1.18 -# tested on version before 3.20, expecting no breaking change going forward -protobuf>3 +# protobuf version beyond 3.20.0 is not compatible with TensorFlow 1.x, therefore is discouraged. +protobuf>3,<3.21.0 ptflops pytorch_wavelets PyWavelets>=1.0.0 diff --git a/requirements/runtime.txt b/requirements/runtime.txt index 9b133548..9ced1dfc 100644 --- a/requirements/runtime.txt +++ b/requirements/runtime.txt @@ -6,8 +6,6 @@ filelock>=3.3.0 numpy opencv-python Pillow>=6.2.0 -# tested on version before 3.20, expecting no breaking change going forward -protobuf>3 pyyaml requests scipy diff --git a/tests/run.py b/tests/run.py index eaa45f60..27af7fe5 100644 --- a/tests/run.py +++ b/tests/run.py @@ -49,7 +49,9 @@ def main(args): if not args.list_tests: result = runner.run(test_suite) if len(result.failures) > 0: - sys.exit(1) + sys.exit(len(result.failures)) + if len(result.errors) > 0: + sys.exit(len(result.errors)) if __name__ == '__main__':