Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use logwarn from openSUSE in CI #45

Merged
merged 3 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ on:
jobs:
test:
runs-on: ubuntu-latest

container:
image: registry.opensuse.org/home/okurz/container/containers/tumbleweed:logwarn
steps:
- uses: actions/checkout@v2

- run: |
wget https://github.com/archiecobbs/logwarn/archive/refs/tags/1.0.16.tar.gz
tar xf 1.0.16.tar.gz
cd logwarn-1.0.16
./autogen.sh && ./configure --prefix=/tmp/logwarn && make && make install

- run: |
PATH=/tmp/logwarn/bin:$PATH prove -v ./test_logwarn
- name: Run unit tests
run: ./test_logwarn
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ A logwarn wrapper with openQA log specific rules.

## Usage

* Install logwarn and call `logwarn_openqa`. By default it will read logs from
* Install logwarn via `sudo zypper in logwarn` if you're on openSUSE
Tumbleweed or from https://github.com/archiecobbs/logwarn otherwise.
* Call `logwarn_openqa`. By default it will read logs from
/var/log/openqa which is where openQA stores logs by default. You can pass
another path as the first argument.

Expand Down
2 changes: 1 addition & 1 deletion logwarn_openqa
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh -e
file="${file:-"${1:-"/var/log/openqa"}"}"
options="${options:-""}"
logwarn="${logwarn:-$(which logwarn)}"
logwarn="${logwarn:-$(command -v logwarn)}"
$logwarn ${options} -m '\[.*:?(debug|info|warn|error)\]' -p ${file} \
`# ignore known warnings mentioned in https://progress.opensuse.org/issues/13952` \
'!got a status update but has no worker' \
Expand Down