Bump Buildroot to 2021.02-rc3 (#1260)
* Rebase patches to Buildroot 2021.02-rc3 * Update Buildroot to 2021.02-rc3 * Declare Kernel headers to be Linux version 5.10 (since they are, and new Buildroot knows about 5.10)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import asyncio
|
||||
import pytest
|
||||
|
||||
|
||||
x = 1
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def f1():
|
||||
global x
|
||||
x = 2
|
||||
yield 15
|
||||
x = 3
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_1():
|
||||
assert x == 1
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_2(f1):
|
||||
assert x == 2
|
||||
assert f1 == 15
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_3():
|
||||
assert x == 3
|
||||
await asyncio.sleep(0.1)
|
||||
assert x == 3
|
||||
25
buildroot/support/testing/tests/package/test_lualdap.py
Normal file
25
buildroot/support/testing/tests/package/test_lualdap.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from tests.package.test_lua import TestLuaBase
|
||||
|
||||
|
||||
class TestLuaLuaLdap(TestLuaBase):
|
||||
config = TestLuaBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_LUA=y
|
||||
BR2_PACKAGE_LUALDAP=y
|
||||
"""
|
||||
|
||||
def test_run(self):
|
||||
self.login()
|
||||
self.module_test("lualdap")
|
||||
|
||||
|
||||
class TestLuajitLuaLdap(TestLuaBase):
|
||||
config = TestLuaBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_LUAJIT=y
|
||||
BR2_PACKAGE_LUALDAP=y
|
||||
"""
|
||||
|
||||
def test_run(self):
|
||||
self.login()
|
||||
self.module_test("lualdap")
|
||||
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
|
||||
from tests.package.test_python import TestPythonPackageBase
|
||||
|
||||
|
||||
class TestPythonPy3PytestAsyncio(TestPythonPackageBase):
|
||||
__test__ = True
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_PYTEST=y
|
||||
BR2_PACKAGE_PYTHON_PYTEST_ASYNCIO=y
|
||||
"""
|
||||
sample_scripts = ["tests/package/sample_python_pytest_asyncio.py"]
|
||||
|
||||
def run_sample_scripts(self):
|
||||
for script in self.sample_scripts:
|
||||
cmd = self.interpreter + " -m pytest " + os.path.basename(script)
|
||||
_, exit_code = self.emulator.run(cmd, timeout=self.timeout)
|
||||
self.assertEqual(exit_code, 0)
|
||||
Reference in New Issue
Block a user