Skip to content

Commit

Permalink
Merge pull request #45 from os-autoinst/logwarn_ver_makef
Browse files Browse the repository at this point in the history
Use logwarn from openSUSE in CI
  • Loading branch information
okurz authored May 9, 2023
2 parents 0772c65 + ee1faf8 commit f524205
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
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

0 comments on commit f524205

Please sign in to comment.