def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.sched-prio-inherit") system = "out/posix/unittest/sched-prio-inherit/system" + get_executable_extension() assert r == 0 cls.impl = ctypes.CDLL(system) pub_sched_tasks = ctypes.POINTER(sched.get_prio_inherit_sched_struct(cls.test_size)) cls.impl_sched = pub_sched_tasks.in_dll(cls.impl, 'pub_sched_tasks')[0]
def setUpClass(cls): # pylint: disable=invalid-name result = os.system("{} {} build posix.unittest.simple".format( sys.executable, base_path('prj', 'app', 'prj.py'))) system = "out/posix/unittest/simple/system" + get_executable_extension( ) assert result == 0 cls.simple = ctypes.CDLL(system)
def setUpClass(cls): # pylint: disable=invalid-name prj_path = base_path('prj', 'app', 'prj.py') command = "build posix.unittest.blocking-mutex" result = os.system("{} {} {}".format(sys.executable, prj_path, command)) system = "out/posix/unittest/blocking-mutex/system" + get_executable_extension() assert result == 0 cls.impl = ctypes.CDLL(system) cls.impl_mutex = (ctypes.POINTER(MutexStruct * NUM_MUTEXES)).in_dll(cls.impl, 'pub_mutexes')[0]
def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.simple-mutex") system = "out/posix/unittest/simple-mutex/system" + get_executable_extension( ) assert r == 0 cls.impl = ctypes.CDLL(system) cls.impl_mutex = ctypes.POINTER(sched.get_rr_sched_struct(10)).in_dll( cls.impl, 'pub_mutexes')[0]
def setUpClass(cls): # pylint: disable=invalid-name result = os.system("{} {} build posix.unittest.sched-rr".format( sys.executable, base_path('prj', 'app', 'prj.py'))) system = "out/posix/unittest/sched-rr/system" + get_executable_extension( ) assert result == 0 cls.impl = ctypes.CDLL(system) cls.impl_sched = ctypes.POINTER(sched.get_rr_sched_struct(10)).in_dll( cls.impl, 'pub_sched_tasks')[0]
def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.blocking-mutex") system = "out/posix/unittest/blocking-mutex/system" + get_executable_extension( ) assert r == 0 cls.impl = ctypes.CDLL(system) cls.impl_mutex = (ctypes.POINTER(MutexStruct * NUM_MUTEXES)).in_dll( cls.impl, 'pub_mutexes')[0]
def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.sched-prio") system = "out/posix/unittest/sched-prio/system" + get_executable_extension( ) assert r == 0 cls.impl = ctypes.CDLL(system) cls.impl_sched = ctypes.POINTER( sched.get_prio_sched_struct(10)).in_dll(cls.impl, 'pub_sched_tasks')[0]
def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.simple-semaphore") system = "out/posix/unittest/simple-semaphore/system" + get_executable_extension() assert r == 0 cls.impl = ctypes.CDLL(system) cls.impl_sem = ctypes.POINTER(SemaphoreStruct).in_dll(cls.impl, 'pub_semaphores') cls.impl_waiters = ctypes.POINTER(ctypes.c_ubyte).in_dll(cls.impl, 'pub_waiters') cls.impl.rtos_sem_try_wait.res_type = ctypes.c_bool cls.unblock_func_ptr = None cls.block_func_ptr = None cls.get_current_task_ptr = None
def setUpClass(cls): # pylint: disable=invalid-name result = os.system("{} {} build posix.unittest.simple-semaphore" .format(sys.executable, base_path('prj', 'app', 'prj.py'))) system = "out/posix/unittest/simple-semaphore/system" + get_executable_extension() assert result == 0 cls.impl = ctypes.CDLL(system) cls.impl_sem = ctypes.POINTER(SemaphoreStruct).in_dll(cls.impl, 'pub_semaphores') cls.impl_waiters = ctypes.POINTER(ctypes.c_ubyte).in_dll(cls.impl, 'pub_waiters') cls.impl.rtos_sem_try_wait.res_type = ctypes.c_bool cls.unblock_func_ptr = None cls.block_func_ptr = None cls.get_current_task_ptr = None
def setUpClass(cls): r = os.system( sys.executable + " ./prj/app/prj.py build posix.unittest.simple-semaphore") system = "out/posix/unittest/simple-semaphore/system" + get_executable_extension( ) assert r == 0 cls.impl = ctypes.CDLL(system) cls.impl_sem = ctypes.POINTER(SemaphoreStruct).in_dll( cls.impl, 'pub_semaphores') cls.impl_waiters = ctypes.POINTER(ctypes.c_ubyte).in_dll( cls.impl, 'pub_waiters') cls.impl.rtos_sem_try_wait.res_type = ctypes.c_bool cls.unblock_func_ptr = None cls.block_func_ptr = None cls.get_current_task_ptr = None
def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.simple") system = "out/posix/unittest/simple/system" + get_executable_extension() assert r == 0 cls.simple = ctypes.CDLL(system)
def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.sched-rr") system = "out/posix/unittest/sched-rr/system" + get_executable_extension() assert r == 0 cls.impl = ctypes.CDLL(system) cls.impl_sched = ctypes.POINTER(sched.get_rr_sched_struct(10)).in_dll(cls.impl, 'pub_sched_tasks')[0]
def setUpClass(cls): r = os.system(sys.executable + " ./prj/app/prj.py build posix.unittest.blocking-mutex") system = "out/posix/unittest/blocking-mutex/system" + get_executable_extension() assert r == 0 cls.impl = ctypes.CDLL(system) cls.impl_mutex = (ctypes.POINTER(MutexStruct * NUM_MUTEXES)).in_dll(cls.impl, 'pub_mutexes')[0]