Files
poky/bitbake/lib/toaster/toastermain/settings_test.py
Alexander Lussier-Cullen 6a87f5d53b bitbake: toaster: make django temp directory configurable
Modify the django settings to make cache, logs and databases save
to a configurable directory with TOASTER_DJANGO_TMPDIR instead of
the machine root level /tmp directory.

In addition, add this variable to the passthroughs for tox.

This change is made to facilitate cleaning test files for runs on
the autobuilder and avoid errors involving the persisted database.

(Bitbake rev: 887aaa91fd54ef24fc3cce42d584b381e37d3343)

Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-23 15:25:01 +00:00

29 lines
616 B
Python

#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
#
# SPDX-License-Identifier: GPL-2.0-only
#
# Django settings for Toaster project.
# Settings overlay to use for running tests
# DJANGO_SETTINGS_MODULE=toastermain.settings-test
from toastermain.settings import *
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '%s/toaster-test-db.sqlite' % TMPDIR,
'TEST': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '%s/toaster-test-db.sqlite' % TMPDIR,
}
}
}