diff options
-rw-r--r-- | bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | 8 | ||||
-rw-r--r-- | bitbake/lib/toaster/tox.ini | 20 |
2 files changed, 27 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py index 9a4e27a3bc..e0ac43768e 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | |||
@@ -33,7 +33,13 @@ def create_selenium_driver(cls,browser='chrome'): | |||
33 | browser = env_browser | 33 | browser = env_browser |
34 | 34 | ||
35 | if browser == 'chrome': | 35 | if browser == 'chrome': |
36 | return webdriver.Chrome() | 36 | options = webdriver.ChromeOptions() |
37 | options.add_argument('headless') | ||
38 | options.add_argument('--disable-infobars') | ||
39 | options.add_argument('--disable-dev-shm-usage') | ||
40 | options.add_argument('--no-sandbox') | ||
41 | options.add_argument('--remote-debugging-port=9222') | ||
42 | return webdriver.Chrome(options=options) | ||
37 | elif browser == 'firefox': | 43 | elif browser == 'firefox': |
38 | return webdriver.Firefox() | 44 | return webdriver.Firefox() |
39 | elif browser == 'marionette': | 45 | elif browser == 'marionette': |
diff --git a/bitbake/lib/toaster/tox.ini b/bitbake/lib/toaster/tox.ini new file mode 100644 index 0000000000..8c0fe17181 --- /dev/null +++ b/bitbake/lib/toaster/tox.ini | |||
@@ -0,0 +1,20 @@ | |||
1 | [tox] | ||
2 | envlist = py38, py39, py310 | ||
3 | skipsdist = True | ||
4 | toxworkdir = {env:TOX_WORKDIR:.tox} | ||
5 | passenv = * | ||
6 | |||
7 | [testenv] | ||
8 | setenv = | ||
9 | DJANGO_SETTINGS_MODULE=toastermain.settings_test | ||
10 | TOASTER_BUILDSERVER=1 | ||
11 | BUILDDIR = {env:BUILDDIR} | ||
12 | EVENTREPLAY_DIR = {env:EVENTREPLAY_DIR:BUILDDIR} | ||
13 | commands = | ||
14 | python3 {toxinidir}/manage.py test tests.db tests.commands tests.builds tests.browser tests.functional tests.views | ||
15 | deps = | ||
16 | -r {toxinidir}/../../toaster-requirements.txt | ||
17 | -r {toxinidir}/tests/toaster-tests-requirements.txt | ||
18 | |||
19 | [testenv:chrome] | ||
20 | commands={[testenv]commands} --splinter-webdriver=chrome \ No newline at end of file | ||