test/browser: run tests inside the tasks container
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).
This commit is contained in:
parent
e112794936
commit
2e8b932ece
4 changed files with 30 additions and 46 deletions
15
test/browser/run-test.sh
Executable file → Normal file
15
test/browser/run-test.sh
Executable file → Normal file
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
set -eux
|
||||
|
||||
cd "${SOURCE}"
|
||||
|
||||
# tests need cockpit's bots/ libraries and test infrastructure
|
||||
cd $SOURCE
|
||||
git init
|
||||
rm -f bots # common local case: existing bots symlink
|
||||
make bots test/common
|
||||
|
|
@ -33,10 +33,15 @@ EXCLUDES=""
|
|||
echo "TEST_ALLOW_JOURNAL_MESSAGES: ${TEST_ALLOW_JOURNAL_MESSAGES:-}"
|
||||
echo "TEST_AUDIT_NO_SELINUX: ${TEST_AUDIT_NO_SELINUX:-}"
|
||||
|
||||
GATEWAY="$(python3 -c 'import socket; print(socket.gethostbyname("_gateway"))')"
|
||||
RC=0
|
||||
test/common/run-tests --nondestructive --machine 127.0.0.1:22 --browser 127.0.0.1:9090 $EXCLUDES || RC=$?
|
||||
./test/common/run-tests \
|
||||
--nondestructive \
|
||||
--machine "${GATEWAY}":22 \
|
||||
--browser "${GATEWAY}":9090 \
|
||||
$EXCLUDES \
|
||||
|| RC=$?
|
||||
|
||||
echo $RC > "$LOGS/exitcode"
|
||||
cp --verbose Test* "$LOGS" || true
|
||||
# deliver test result via exitcode file
|
||||
exit 0
|
||||
exit $RC
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue