mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
tests: functional: Add enable-all-apps script
[sunil] - Move the script to plinth/tests/functional directory as it is the right place for it. - Add HACKING.md entry to talk about the script. - Update the pyproject.toml to ensure that functional tests config.ini is installed along with functional tests python code. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
5a9d5730a7
commit
c7673e039d
13
HACKING.md
13
HACKING.md
@ -589,6 +589,19 @@ installed.
|
||||
$ py.test-3 -n 4 --dist=loadfile --include-functional -m essential
|
||||
```
|
||||
|
||||
#### Enabling all apps
|
||||
|
||||
When testing distribution upgrades from a stable release to next stable release
|
||||
or testing, it is beneficial to install all available FreedomBox applications.
|
||||
There is a script available to perform operation.
|
||||
|
||||
In the VM or container, run the following command:
|
||||
|
||||
```
|
||||
guest$ cd /freedombox
|
||||
guest$ sudo make build install
|
||||
guest$ plinth/tests/functional/enable-all-apps
|
||||
```
|
||||
|
||||
[back to index](#hacking)
|
||||
|
||||
|
||||
31
plinth/tests/functional/enable-all-apps
Executable file
31
plinth/tests/functional/enable-all-apps
Executable file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/python3
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#
|
||||
# Set FREEDOMBOX_URL to the URL of the FreedomBox on which
|
||||
# all apps will be enabled.
|
||||
|
||||
from splinter import Browser
|
||||
|
||||
from plinth import app as app_module, module_loader
|
||||
from plinth.tests.functional import app_enable, install, login
|
||||
|
||||
module_loader.load_modules()
|
||||
app_module.apps_init()
|
||||
|
||||
browser = Browser('firefox')
|
||||
login(browser)
|
||||
|
||||
for app in app_module.App.list():
|
||||
app_name = app.app_id
|
||||
try:
|
||||
# Some apps cannot be installed.
|
||||
install(browser, app_name)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
app_enable(browser, app_name)
|
||||
except:
|
||||
# Some apps cannot be enabled.
|
||||
pass
|
||||
@ -112,7 +112,12 @@ version = {attr = "plinth.__version__"}
|
||||
include = ["plinth", "plinth.*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
"*" = ["templates/*", "static/**", "locale/*/LC_MESSAGES/*.mo"]
|
||||
"*" = [
|
||||
"templates/*",
|
||||
"static/**",
|
||||
"locale/*/LC_MESSAGES/*.mo",
|
||||
"tests/functional/config.ini"
|
||||
]
|
||||
|
||||
[tool.setuptools.exclude-package-data]
|
||||
"*" = ["*/data/*"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user