diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2022-03-30 12:51:06 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-04-12 13:53:32 -0400 |
commit | 0689d8b3e10e969b7fed0af9ac906222858e4fb9 (patch) | |
tree | 6c5b86db1582961ab479b3505b82c81c58d956a6 /.cirrus.yml | |
parent | d64988edd297a555a8482f98d7bd5b411fa582cd (diff) | |
download | sos-0689d8b3e10e969b7fed0af9ac906222858e4fb9.tar.gz |
[utilities] Better detect binary files with python3-magic
Adds a new `file_is_binary()` method to `sos.utilities` to serve as a
single point to determine if a file is binary or not, relying on the
python3-magic module.
Closes: #2839
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to '.cirrus.yml')
-rw-r--r-- | .cirrus.yml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index 866478c9..1592b5a3 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -60,7 +60,8 @@ py_break_task: PY_VERSION: "latest" - env: PY_VERSION: "3.9" - setup_script: pip install -r requirements.txt + # This image has 2 py environments. Install to the one sos uses. + setup_script: pip3 install -t /usr/lib/python3/dist-packages -r requirements.txt main_script: ./bin/sos report --batch # Make sure a user can manually build an rpm from the checkout @@ -120,7 +121,7 @@ report_stageone_task: dnf -y remove sos dnf -y install python3-pip ethtool fi - setup_script: &setup 'pip3 install avocado-framework==94.0' + setup_script: &setup 'pip3 install avocado-framework==94.0 python-magic' # run the unittests separately as they require a different PYTHONPATH in # order for the imports to work properly under avocado unittest_script: PYTHONPATH=. avocado run tests/unittests/ |