Update buildroot 2020.02.01 (#622)
* Update buildroot 2020.02.01 Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Fix LN * Fix wpa Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Fix lint Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * fix-network Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Fix script Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
49
buildroot/support/testing/tests/package/test_crudini.py
Normal file
49
buildroot/support/testing/tests/package/test_crudini.py
Normal file
@@ -0,0 +1,49 @@
|
||||
import os
|
||||
from tests.package.test_python import TestPythonPackageBase
|
||||
|
||||
|
||||
INI_FILE_CONTENT = """
|
||||
[section]
|
||||
param = this-is-the-magic-value
|
||||
other = dont care
|
||||
"""
|
||||
|
||||
|
||||
class TestCrudiniBase(TestPythonPackageBase):
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_CRUDINI=y
|
||||
"""
|
||||
|
||||
def test_run(self):
|
||||
img = os.path.join(self.builddir, "images", "rootfs.cpio")
|
||||
self.emulator.boot(arch="armv5", kernel="builtin",
|
||||
options=["-initrd", img])
|
||||
|
||||
self.emulator.login()
|
||||
|
||||
# 1. Create some sample .ini file
|
||||
cmd = "echo -e '%s' > config.ini" % INI_FILE_CONTENT
|
||||
_, ret = self.emulator.run(cmd)
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
# 2. Attempt to get the value
|
||||
out, ret = self.emulator.run("crudini --get config.ini section param")
|
||||
self.assertEqual(ret, 0)
|
||||
self.assertEqual(out, ['this-is-the-magic-value'])
|
||||
|
||||
|
||||
class TestCrudiniPy2(TestCrudiniBase):
|
||||
__test__ = True
|
||||
config = TestCrudiniBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON=y
|
||||
"""
|
||||
|
||||
|
||||
class TestCrudiniPy3(TestCrudiniBase):
|
||||
__test__ = True
|
||||
config = TestCrudiniBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
"""
|
||||
Reference in New Issue
Block a user