Convert wolf-py-tests inc files to declarative syntax so test installs apply when included via wolfssl_conditional_require
parent
8c8628ca5d
commit
258de30963
|
|
@ -1,33 +1,19 @@
|
||||||
# Enable test directory installation for wolfcrypt-py
|
# Enable test directory installation for wolfcrypt-py
|
||||||
#
|
#
|
||||||
# This include file configures wolfcrypt-py to install its test directory
|
# Declarative on purpose: this inc is included by wolfssl_conditional_require()
|
||||||
# to the target system for running Python binding tests.
|
# from an anonymous function, and python () blocks registered that late never
|
||||||
|
# run. FILES uses the literal package name because expandKeys() has already run.
|
||||||
|
|
||||||
WOLFCRYPT_PY_TEST_DIR = "${S}"
|
WOLFCRYPT_PY_TEST_DIR = "${S}"
|
||||||
WOLFCRYPT_PY_DIR = "/home/root/wolf-py-tests/wolfcrypt-py-test"
|
WOLFCRYPT_PY_DIR = "/home/root/wolf-py-tests/wolfcrypt-py-test"
|
||||||
WOLFCRYPT_PY_TEST_TARGET_DIR = "${D}${WOLFCRYPT_PY_DIR}"
|
WOLFCRYPT_PY_TEST_TARGET_DIR = "${D}${WOLFCRYPT_PY_DIR}"
|
||||||
|
|
||||||
python () {
|
do_install_append() {
|
||||||
distro_version = d.getVar('DISTRO_VERSION', True)
|
install -m 0755 -d "${WOLFCRYPT_PY_TEST_TARGET_DIR}"
|
||||||
wolfcrypt_py_test_dir = d.getVar('WOLFCRYPT_PY_TEST_DIR', True)
|
cp -r ${WOLFCRYPT_PY_TEST_DIR}/* ${WOLFCRYPT_PY_TEST_TARGET_DIR}
|
||||||
wolfcrypt_py_test_target_dir = d.getVar('WOLFCRYPT_PY_TEST_TARGET_DIR', True)
|
|
||||||
|
|
||||||
installDirCmd = 'install -m 0755 -d "%s"\n' % wolfcrypt_py_test_target_dir
|
|
||||||
cpWolfcryptPyTestCmd = 'cp -r %s/* %s\n' % (wolfcrypt_py_test_dir, wolfcrypt_py_test_target_dir)
|
|
||||||
|
|
||||||
d.appendVar('do_install', installDirCmd)
|
|
||||||
d.appendVar('do_install', cpWolfcryptPyTestCmd)
|
|
||||||
|
|
||||||
pn = d.getVar('PN', True)
|
|
||||||
wolfcrypt_py_dir = d.getVar('WOLFCRYPT_PY_DIR', True)
|
|
||||||
|
|
||||||
# Legacy always uses underscore syntax
|
|
||||||
files_var_name = 'FILES_' + pn
|
|
||||||
|
|
||||||
current_files = d.getVar(files_var_name, True) or ""
|
|
||||||
new_files = current_files + ' ' + wolfcrypt_py_dir + '/*'
|
|
||||||
d.setVar(files_var_name, new_files)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILES_wolfcrypt-py += "${WOLFCRYPT_PY_DIR}/*"
|
||||||
|
|
||||||
# Python Specific option
|
# Python Specific option
|
||||||
export PYTHONDONTWRITEBYTECODE = "1"
|
export PYTHONDONTWRITEBYTECODE = "1"
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,19 @@
|
||||||
# Enable test directory installation for wolfcrypt-py
|
# Enable test directory installation for wolfcrypt-py
|
||||||
#
|
#
|
||||||
# This include file configures wolfcrypt-py to install its test directory
|
# Declarative on purpose: this inc is included by wolfssl_conditional_require()
|
||||||
# to the target system for running Python binding tests.
|
# from an anonymous function, and python () blocks registered that late never
|
||||||
|
# run. FILES uses the literal package name because expandKeys() has already run.
|
||||||
|
|
||||||
WOLFCRYPT_PY_TEST_DIR = "${S}"
|
WOLFCRYPT_PY_TEST_DIR = "${S}"
|
||||||
WOLFCRYPT_PY_DIR = "/home/root/wolf-py-tests/wolfcrypt-py-test"
|
WOLFCRYPT_PY_DIR = "/home/root/wolf-py-tests/wolfcrypt-py-test"
|
||||||
WOLFCRYPT_PY_TEST_TARGET_DIR = "${D}${WOLFCRYPT_PY_DIR}"
|
WOLFCRYPT_PY_TEST_TARGET_DIR = "${D}${WOLFCRYPT_PY_DIR}"
|
||||||
|
|
||||||
python () {
|
do_install:append() {
|
||||||
distro_version = d.getVar('DISTRO_VERSION', True)
|
install -m 0755 -d "${WOLFCRYPT_PY_TEST_TARGET_DIR}"
|
||||||
wolfcrypt_py_test_dir = d.getVar('WOLFCRYPT_PY_TEST_DIR', True)
|
cp -r ${WOLFCRYPT_PY_TEST_DIR}/* ${WOLFCRYPT_PY_TEST_TARGET_DIR}
|
||||||
wolfcrypt_py_test_target_dir = d.getVar('WOLFCRYPT_PY_TEST_TARGET_DIR', True)
|
|
||||||
|
|
||||||
installDirCmd = 'install -m 0755 -d "%s"\n' % wolfcrypt_py_test_target_dir
|
|
||||||
cpWolfcryptPyTestCmd = 'cp -r %s/* %s\n' % (wolfcrypt_py_test_dir, wolfcrypt_py_test_target_dir)
|
|
||||||
|
|
||||||
d.appendVar('do_install', installDirCmd)
|
|
||||||
d.appendVar('do_install', cpWolfcryptPyTestCmd)
|
|
||||||
|
|
||||||
pn = d.getVar('PN', True)
|
|
||||||
wolfcrypt_py_dir = d.getVar('WOLFCRYPT_PY_DIR', True)
|
|
||||||
|
|
||||||
if distro_version and (distro_version.startswith('2.') or distro_version.startswith('3.')):
|
|
||||||
files_var_name = 'FILES_' + pn
|
|
||||||
else:
|
|
||||||
files_var_name = 'FILES:' + pn
|
|
||||||
|
|
||||||
current_files = d.getVar(files_var_name, True) or ""
|
|
||||||
new_files = current_files + ' ' + wolfcrypt_py_dir + '/*'
|
|
||||||
d.setVar(files_var_name, new_files)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILES:wolfcrypt-py += "${WOLFCRYPT_PY_DIR}/*"
|
||||||
|
|
||||||
# Python Specific option
|
# Python Specific option
|
||||||
export PYTHONDONTWRITEBYTECODE = "1"
|
export PYTHONDONTWRITEBYTECODE = "1"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
# Configuration to enable wolf-py-tests support in wolfssl
|
# Configuration to enable wolf-py-tests support in wolfssl
|
||||||
# Python tests may need specific features enabled
|
# Python tests may need specific features enabled
|
||||||
|
#
|
||||||
|
# Declarative on purpose: this inc is included by wolfssl_conditional_require()
|
||||||
|
# from an anonymous function, and python () blocks registered that late never
|
||||||
|
# run. FILES uses the literal package name because expandKeys() has already run.
|
||||||
EXTRA_OECONF += "--enable-shared"
|
EXTRA_OECONF += "--enable-shared"
|
||||||
|
|
||||||
WOLFSSL_PY_TEST_CERTS_DIR = "/home/root/wolf-py-tests/certs"
|
WOLFSSL_PY_TEST_CERTS_DIR = "/home/root/wolf-py-tests/certs"
|
||||||
|
|
@ -7,27 +11,11 @@ WOLFSSL_PY_CERTS_DIR = "/certs"
|
||||||
WOLFSSL_PY_CERTS_INSTALL_DIR = "${D}${WOLFSSL_PY_TEST_CERTS_DIR}"
|
WOLFSSL_PY_CERTS_INSTALL_DIR = "${D}${WOLFSSL_PY_TEST_CERTS_DIR}"
|
||||||
WOLFSSL_PY_CERTS_SOURCE_DIR = "${S}${WOLFSSL_PY_CERTS_DIR}"
|
WOLFSSL_PY_CERTS_SOURCE_DIR = "${S}${WOLFSSL_PY_CERTS_DIR}"
|
||||||
|
|
||||||
python () {
|
do_install_append() {
|
||||||
distro_version = d.getVar('DISTRO_VERSION', True)
|
bbnote "Installing Certs Directory for wolf-py Tests"
|
||||||
wolfssl_py_certs_install_dir = d.getVar('WOLFSSL_PY_CERTS_INSTALL_DIR', True)
|
install -m 0755 -d "${WOLFSSL_PY_CERTS_INSTALL_DIR}"
|
||||||
wolfssl_py_certs_source_dir = d.getVar('WOLFSSL_PY_CERTS_SOURCE_DIR', True)
|
cp -r ${WOLFSSL_PY_CERTS_SOURCE_DIR}/*.der ${WOLFSSL_PY_CERTS_INSTALL_DIR}
|
||||||
|
cp -r ${WOLFSSL_PY_CERTS_SOURCE_DIR}/*.pem ${WOLFSSL_PY_CERTS_INSTALL_DIR}
|
||||||
bbnote = 'bbnote "Installing Certs Directory for wolf-py Tests"\n'
|
|
||||||
installDir = 'install -m 0755 -d "%s"\n' % (wolfssl_py_certs_install_dir)
|
|
||||||
cpDer = 'cp -r %s/*.der %s\n' % (wolfssl_py_certs_source_dir, wolfssl_py_certs_install_dir)
|
|
||||||
cpPem = 'cp -r %s/*.pem %s\n' % (wolfssl_py_certs_source_dir, wolfssl_py_certs_install_dir)
|
|
||||||
|
|
||||||
d.appendVar('do_install', bbnote)
|
|
||||||
d.appendVar('do_install', installDir)
|
|
||||||
d.appendVar('do_install', cpDer)
|
|
||||||
d.appendVar('do_install', cpPem)
|
|
||||||
|
|
||||||
pn = d.getVar('PN', True)
|
|
||||||
wolfssl_py_test_certs_dir = d.getVar('WOLFSSL_PY_TEST_CERTS_DIR', True)
|
|
||||||
# Legacy always uses underscore syntax
|
|
||||||
files_var_name = 'FILES_' + pn
|
|
||||||
|
|
||||||
current_files = d.getVar(files_var_name, True) or ""
|
|
||||||
new_files = current_files + ' ' + wolfssl_py_test_certs_dir + '/*'
|
|
||||||
d.setVar(files_var_name, new_files)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILES_wolfssl += "${WOLFSSL_PY_TEST_CERTS_DIR}/*"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
# Configuration to enable wolf-py-tests support in wolfssl
|
# Configuration to enable wolf-py-tests support in wolfssl
|
||||||
# Python tests may need specific features enabled
|
# Python tests may need specific features enabled
|
||||||
|
#
|
||||||
|
# Declarative on purpose: this inc is included by wolfssl_conditional_require()
|
||||||
|
# from an anonymous function, and python () blocks registered that late never
|
||||||
|
# run. FILES uses the literal package name because expandKeys() has already run.
|
||||||
EXTRA_OECONF += "--enable-shared"
|
EXTRA_OECONF += "--enable-shared"
|
||||||
|
|
||||||
WOLFSSL_PY_TEST_CERTS_DIR = "/home/root/wolf-py-tests/certs"
|
WOLFSSL_PY_TEST_CERTS_DIR = "/home/root/wolf-py-tests/certs"
|
||||||
|
|
@ -7,29 +11,11 @@ WOLFSSL_PY_CERTS_DIR = "/certs"
|
||||||
WOLFSSL_PY_CERTS_INSTALL_DIR = "${D}${WOLFSSL_PY_TEST_CERTS_DIR}"
|
WOLFSSL_PY_CERTS_INSTALL_DIR = "${D}${WOLFSSL_PY_TEST_CERTS_DIR}"
|
||||||
WOLFSSL_PY_CERTS_SOURCE_DIR = "${S}${WOLFSSL_PY_CERTS_DIR}"
|
WOLFSSL_PY_CERTS_SOURCE_DIR = "${S}${WOLFSSL_PY_CERTS_DIR}"
|
||||||
|
|
||||||
python () {
|
do_install:append() {
|
||||||
distro_version = d.getVar('DISTRO_VERSION', True)
|
bbnote "Installing Certs Directory for wolf-py Tests"
|
||||||
wolfssl_py_certs_install_dir = d.getVar('WOLFSSL_PY_CERTS_INSTALL_DIR', True)
|
install -m 0755 -d "${WOLFSSL_PY_CERTS_INSTALL_DIR}"
|
||||||
wolfssl_py_certs_source_dir = d.getVar('WOLFSSL_PY_CERTS_SOURCE_DIR', True)
|
cp -r ${WOLFSSL_PY_CERTS_SOURCE_DIR}/*.der ${WOLFSSL_PY_CERTS_INSTALL_DIR}
|
||||||
|
cp -r ${WOLFSSL_PY_CERTS_SOURCE_DIR}/*.pem ${WOLFSSL_PY_CERTS_INSTALL_DIR}
|
||||||
bbnote = 'bbnote "Installing Certs Directory for wolf-py Tests"\n'
|
|
||||||
installDir = 'install -m 0755 -d "%s"\n' % (wolfssl_py_certs_install_dir)
|
|
||||||
cpDer = 'cp -r %s/*.der %s\n' % (wolfssl_py_certs_source_dir, wolfssl_py_certs_install_dir)
|
|
||||||
cpPem = 'cp -r %s/*.pem %s\n' % (wolfssl_py_certs_source_dir, wolfssl_py_certs_install_dir)
|
|
||||||
|
|
||||||
d.appendVar('do_install', bbnote)
|
|
||||||
d.appendVar('do_install', installDir)
|
|
||||||
d.appendVar('do_install', cpDer)
|
|
||||||
d.appendVar('do_install', cpPem)
|
|
||||||
|
|
||||||
pn = d.getVar('PN', True)
|
|
||||||
wolfssl_py_test_certs_dir = d.getVar('WOLFSSL_PY_TEST_CERTS_DIR', True)
|
|
||||||
if distro_version and (distro_version.startswith('2.') or distro_version.startswith('3.')):
|
|
||||||
files_var_name = 'FILES_' + pn
|
|
||||||
else:
|
|
||||||
files_var_name = 'FILES:' + pn
|
|
||||||
|
|
||||||
current_files = d.getVar(files_var_name, True) or ""
|
|
||||||
new_files = current_files + ' ' + wolfssl_py_test_certs_dir + '/*'
|
|
||||||
d.setVar(files_var_name, new_files)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILES:wolfssl += "${WOLFSSL_PY_TEST_CERTS_DIR}/*"
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,19 @@
|
||||||
# Enable test directory installation for wolfssl-py
|
# Enable test directory installation for wolfssl-py
|
||||||
#
|
#
|
||||||
# This include file configures wolfssl-py to install its test directory
|
# Declarative on purpose: this inc is included by wolfssl_conditional_require()
|
||||||
# to the target system for running Python binding tests.
|
# from an anonymous function, and python () blocks registered that late never
|
||||||
|
# run. FILES uses the literal package name because expandKeys() has already run.
|
||||||
|
|
||||||
WOLFSSL_PY_TEST_DIR = "${S}"
|
WOLFSSL_PY_TEST_DIR = "${S}"
|
||||||
WOLFSSL_PY_DIR = "/home/root/wolf-py-tests/wolfssl-py-test"
|
WOLFSSL_PY_DIR = "/home/root/wolf-py-tests/wolfssl-py-test"
|
||||||
WOLFSSL_PY_TEST_TARGET_DIR = "${D}${WOLFSSL_PY_DIR}"
|
WOLFSSL_PY_TEST_TARGET_DIR = "${D}${WOLFSSL_PY_DIR}"
|
||||||
|
|
||||||
python () {
|
do_install_append() {
|
||||||
distro_version = d.getVar('DISTRO_VERSION', True)
|
install -m 0755 -d "${WOLFSSL_PY_TEST_TARGET_DIR}"
|
||||||
wolfssl_py_test_dir = d.getVar('WOLFSSL_PY_TEST_DIR', True)
|
cp -r ${WOLFSSL_PY_TEST_DIR}/* ${WOLFSSL_PY_TEST_TARGET_DIR}
|
||||||
wolfssl_py_test_target_dir = d.getVar('WOLFSSL_PY_TEST_TARGET_DIR', True)
|
|
||||||
|
|
||||||
installDir = 'install -m 0755 -d "%s"\n' % (wolfssl_py_test_target_dir)
|
|
||||||
cpWolfsslPyTest = 'cp -r %s/* %s\n' % (wolfssl_py_test_dir, wolfssl_py_test_target_dir)
|
|
||||||
|
|
||||||
d.appendVar('do_install', installDir)
|
|
||||||
d.appendVar('do_install', cpWolfsslPyTest)
|
|
||||||
|
|
||||||
# Append to FILES_${PN} within the Python function
|
|
||||||
pn = d.getVar('PN', True)
|
|
||||||
wolfssl_py_dir = d.getVar('WOLFSSL_PY_DIR', True)
|
|
||||||
|
|
||||||
# Legacy always uses underscore syntax
|
|
||||||
files_var_name = 'FILES_' + pn
|
|
||||||
|
|
||||||
current_files = d.getVar(files_var_name, True) or ""
|
|
||||||
new_files = current_files + ' ' + wolfssl_py_dir + '/*'
|
|
||||||
d.setVar(files_var_name, new_files)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILES_wolfssl-py += "${WOLFSSL_PY_DIR}/*"
|
||||||
|
|
||||||
# Python Specific option
|
# Python Specific option
|
||||||
export PYTHONDONTWRITEBYTECODE = "1"
|
export PYTHONDONTWRITEBYTECODE = "1"
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,19 @@
|
||||||
# Enable test directory installation for wolfssl-py
|
# Enable test directory installation for wolfssl-py
|
||||||
#
|
#
|
||||||
# This include file configures wolfssl-py to install its test directory
|
# Declarative on purpose: this inc is included by wolfssl_conditional_require()
|
||||||
# to the target system for running Python binding tests.
|
# from an anonymous function, and python () blocks registered that late never
|
||||||
|
# run. FILES uses the literal package name because expandKeys() has already run.
|
||||||
|
|
||||||
WOLFSSL_PY_TEST_DIR = "${S}"
|
WOLFSSL_PY_TEST_DIR = "${S}"
|
||||||
WOLFSSL_PY_DIR = "/home/root/wolf-py-tests/wolfssl-py-test"
|
WOLFSSL_PY_DIR = "/home/root/wolf-py-tests/wolfssl-py-test"
|
||||||
WOLFSSL_PY_TEST_TARGET_DIR = "${D}${WOLFSSL_PY_DIR}"
|
WOLFSSL_PY_TEST_TARGET_DIR = "${D}${WOLFSSL_PY_DIR}"
|
||||||
|
|
||||||
python () {
|
do_install:append() {
|
||||||
distro_version = d.getVar('DISTRO_VERSION', True)
|
install -m 0755 -d "${WOLFSSL_PY_TEST_TARGET_DIR}"
|
||||||
wolfssl_py_test_dir = d.getVar('WOLFSSL_PY_TEST_DIR', True)
|
cp -r ${WOLFSSL_PY_TEST_DIR}/* ${WOLFSSL_PY_TEST_TARGET_DIR}
|
||||||
wolfssl_py_test_target_dir = d.getVar('WOLFSSL_PY_TEST_TARGET_DIR', True)
|
|
||||||
|
|
||||||
installDir = 'install -m 0755 -d "%s"\n' % (wolfssl_py_test_target_dir)
|
|
||||||
cpWolfsslPyTest = 'cp -r %s/* %s\n' % (wolfssl_py_test_dir, wolfssl_py_test_target_dir)
|
|
||||||
|
|
||||||
d.appendVar('do_install', installDir)
|
|
||||||
d.appendVar('do_install', cpWolfsslPyTest)
|
|
||||||
|
|
||||||
# Append to FILES:${PN} within the Python function
|
|
||||||
pn = d.getVar('PN', True)
|
|
||||||
wolfssl_py_dir = d.getVar('WOLFSSL_PY_DIR', True)
|
|
||||||
|
|
||||||
if distro_version and (distro_version.startswith('2.') or distro_version.startswith('3.')):
|
|
||||||
files_var_name = 'FILES_' + pn
|
|
||||||
else:
|
|
||||||
files_var_name = 'FILES:' + pn
|
|
||||||
|
|
||||||
current_files = d.getVar(files_var_name, True) or ""
|
|
||||||
new_files = current_files + ' ' + wolfssl_py_dir + '/*'
|
|
||||||
d.setVar(files_var_name, new_files)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILES:wolfssl-py += "${WOLFSSL_PY_DIR}/*"
|
||||||
|
|
||||||
# Python Specific option
|
# Python Specific option
|
||||||
export PYTHONDONTWRITEBYTECODE = "1"
|
export PYTHONDONTWRITEBYTECODE = "1"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue