Skip to content

Commit 7ebb8e1

Browse files
author
Sebastian Wagner
committed
TST: lib/test: skip_ci: detect dpkg-buildpackage environments
see https://lists.cert.at/pipermail/intelmq-dev/2021-October/000528.html and following
1 parent 5b1ba86 commit 7ebb8e1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ CHANGELOG
8282

8383
### Tests
8484
- Add GitHub Action to run regexploit on all Python, JSON and YAML files (PR#2059 by Sebastian Wagner).
85+
- `intelmq.lib.test`:
86+
- Decorator `skip_ci` also detects `dpkg-buildpackage` environments by checking the environment variable `DEB_BUILD_ARCH` (PR#2123 by Sebastian Wagner).
8587

8688
### Tools
8789

intelmq/lib/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def skip_exotic():
9696

9797

9898
def skip_ci():
99-
return unittest.skipIf(os.getenv('CI') == 'true', 'Test disabled on CI.')
99+
return unittest.skipIf(os.getenv('CI') == 'true' or os.environ.get('DEB_BUILD_ARCH'),
100+
'Test disabled on CI.')
100101

101102

102103
def skip_build_environment():

0 commit comments

Comments
 (0)