With commit 2e8b932e, run-test.sh now runs inside the cockpit/tasks
container, and its os-release is irrelevant. Read the host's os-release
instead to compute a correct `$TEST_OS`.
This simplifies the "outside" setup quite a bit and gives us the same
tasks container that test runs on the Cockpit CI run under.
This change also implicitly changes the test browser to chromium (which
is no longer an issue — we just use it from the tasks container).
These will soon take over ESLint and stylelint, plus they also cover
ruff and other goodies for the Python part. This supersedes the explicit
ruff call.
This is already being used by cockpit-{podman,machines,navigator} etc.
Apply our standard set of rules from our cockpit projects, and fix some
minor fallout:
```
test/check-application:7:1: I001 [*] Import block is un-sorted or un-formatted
test/check-application:9:119: E501 Line too long (122 > 118 characters)
```
Run ruff in CI to ensure we don't break it.
This will allow us to control the value from test plans, in particular
for disabling at least some unexpected message checks for reverse
dependency testing. We don't want to disable unexpected messages
in general for fmf, as we are looking for exactly these in e.g.
selinux-policy reverse dependency tests.
Move from `su` to `runtest`, as with the former it's impossible to plumb
through variables with non-trivial characters, as they cannot be quoted.
Taken from c38692fa4c
... and make use of the new pywrap feature from our test.
Use the same eslint and stylelint plugin configuration as the cockpit
main repo.
Co-authored-by: Katerina Koukiou <kkoukiou@redhat.com>
Cockpit recently changed to an ESM build system [1]. Bump
COCKPIT_REPO_COMMIT to that and follow suit.
This does not work with old node.js 10 any more which is still the
default in RHEL 8. Install the newer version 16 instead.
[1] https://github.com/cockpit-project/cockpit/pull/18366
run-tests recently got a new `--track-naughties` option [1] to explicitly
enable updating known issues on GitHub. Enable it for CI runs, and leave
it disabled for local runs and PackIt, as in these cases we don't want
to try and talk to GitHub.
[1] 7ef88e80ce
This was fixed in Cockpit 265, and has only ever affected Chromium, not
Firefox. Restrict the hack accordingly, to make sure this does not
regress again.
This centralizes/factorizes the rpm package builds, and builds
RPM packages in the VM instead of on the host, which is cleaner. It also
paves the way for supporting Debian and arch builds.
Drop the `make srpm` rule, as it's not very useful. Keep the `make rpm`
rule, as sometimes developers do this manually. This might be replaced
later on with another image-customize feature which copies the built rpm
out of the VM.
Upgrading glibc in Rawhide now (semi-intentionally) removes
/etc/nsswitch.conf, but does not enforce installing a new enough
pam/authselect to ensure that it gets re-added. This breaks resolving
"localhost".
Reported as https://bugzilla.redhat.com/show_bug.cgi?id=2033020
Sync some improvements from cockpit-machines:
* Unbreak running `tmt` in local trees with an already existing ./bots
symlink.
* Don't install all NPM packages, only chrome-remote-interface and sizzle.
* Disable detection of affected tests, taking too long for real
projects.
The tests switch to German, make sure that the corresponding locale
exists. Otherwise, tests will run into unexpected messages like "invalid
or unusable locale: de_DE.UTF-8".
Copy and adjust the browser.sh and run-test.sh scripts from
cockpit-podman, which we have used in Fedora/RHEL dist-git gating and
packit tests for a while.
f1542d54db rewrote
the language selector dialog. Update the tests to also work with
cockpit ≥ 233.
Do the version comparison dynamically for the time being, as this breaks
several image refreshes. We can drop this again and only use the new
code once all of these landed.
* Stop importing cockpit's base1/patternfly.css
This is deprecated API and will be dropped at some point, in favor
of projects shipping their own CSS.
Install and import the styles from PF4 now.
* Use webpack based string replacement for removing the font-face rules from PF4
Doing the seddery in Makefile breaks `npm run build`, webpack watching,
and is generally brittle.
Do the font replacement hacking with `string-replace-loader`, which fits into webpack much more nicely.
There is still some potential simplification by not duplicating the
entire scss loader chain.
Co-authored-by: Martin Pitt <martin@piware.de>
Closes#315
Similar to what cockpit-composer does. This is rather simplistic, but
does fine until we need more complex scenarios.
Also use plain shell in test/run, there are no bashisms.
Closes#291