Skip to content
Snippets Groups Projects
Commit 40aebf36 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

[tests] Infer test name from first test source file

This also fixes a bug in
	 source = test_dict['source'][0]
so the source(s) used for the test was always only the first source
file. I did/does not matter, as we do not have tests that span
multiple source files (and I am not sure if we ever will have).
parent 5537bde5
No related branches found
No related tags found
No related merge requests found
......@@ -9,14 +9,12 @@ liburcu_cds = option_urcu ? cc.find_library('urcu-cds') : disabler()
tests = [
{
'source': files('SimpleFibTest.cpp'),
'name': 'SimpleFibTest',
'description': 'Simple test',
'test_runner': 'emper',
},
{
'source': files('SimplestFibTest.cpp'),
'name': 'SimplestFibTest',
'description': 'Simplest fib test',
'test_suite': 'smoke',
'is_parallel': true,
......@@ -24,7 +22,6 @@ tests = [
{
'source': files('RuntimeDestroyTest.cpp'),
'name': 'RuntimeDestroyTest',
'description': 'Test runtime destruction',
'test_suite': 'smoke',
'is_parallel': true,
......@@ -32,33 +29,28 @@ tests = [
{
'source': files('c_api_test.c'),
'name': 'c_api_test',
'description': 'Test EMPER\'s C API',
},
{
'source': files('CppApiTest.cpp'),
'name': 'CppApiTest',
'description': 'Test EMPER\'s C++ API',
},
{
'source': files('YieldToAnywhereTest.cpp'),
'name': 'YieldToAnywhereTest',
'description': 'Test emper::yieldToAnywhere',
'test_runner': 'emper',
},
{
'source': files('ScheduleOnTest.cpp'),
'name': 'ScheduleOnTest',
'description': 'Test Scheduler::scheduleOn',
'test_runner': 'emper',
},
{
'source': files('ScheduleOnUnknownWorkerTest.cpp'),
'name': 'ScheduleOnUnknownWorkerTest',
'description': 'Test Scheduler::scheduleOn with to big workerId',
'should_fail': true,
'is_parallel': true,
......@@ -66,52 +58,44 @@ tests = [
{
'source': files('ReuseBpsTest.cpp'),
'name': 'ReuseBpsTest',
'description': 'Test resetting of BPSs',
'test_runner': 'emper',
},
{
'source': files('SimpleActorTest.cpp'),
'name': 'SimpleActorTest',
'description': 'Simple Actor Test',
},
{
'source': files('AlarmActorTest.cpp'),
'name': 'AlarmActorTest',
'description': 'Use an Actor to unblock fibers using BPS',
},
{
'source': files('UnblockOnMainActorTest.cpp'),
'name': 'UnblockOnMainActorTest',
'description': 'Slight modification of AlarmActorTest using the main thread to signal BPS',
},
{
'source': files('SimpleLawsTest.cpp'),
'name': 'SimpleLawsTest',
'description': 'Simple LAWS scheduling strategy test',
},
{
'source': files('SimpleUrcuTest.cpp'),
'name': 'SimpleUrcuTest',
'description': 'Simple userspace-rcu hash table test',
'dependencies': [liburcu_memb, liburcu_cds]
},
{
'source': files('BinaryPrivateSemaphoreTest.cpp'),
'name': 'BinaryPrivateSemaphoreTest',
'description': 'Concurrent test for BinrayPrivateSemaphores',
'test_runner': 'emper',
},
{
'source': files('SignalPrivateSemaphoreFromAnywhereTest.cpp'),
'name': 'SignalPrivateSemaphoreFromAnywhereTest',
'description': 'Simple test for PrivateSemaphore:signalFromAnywhere()',
'test_suite': 'smoke',
'is_parallel': true,
......@@ -120,7 +104,6 @@ tests = [
{
'source': files('TellActorFromAnywhereTest.cpp'),
'name': 'TellActorFromAnywhereTest',
'description': 'Simple test for Actor:tellFromAnywhere()',
'test_suite': 'smoke',
'is_parallel': true,
......@@ -129,7 +112,6 @@ tests = [
{
'source': files('ContextOutOfBoundsTest.cpp'),
'name': 'ContextOutOfBoundsTest',
'description': 'Simple test for our stack guard page',
'is_parallel': true,
'test_runner': 'guard-page',
......@@ -171,11 +153,8 @@ fs = import('fs')
foreach test_dict : tests
# The test_name is the name of the source file without the file suffix'.
source = test_dict['source'][0]
# Currently fs does not support files() objects
# https://github.com/mesonbuild/meson/issues/8608
# TODO: Use meson fs (filesystem) module once this is solved an in buster-backports
test_name = test_dict['name']
source = test_dict['source']
test_name = test_dict.get('name', fs.stem(source[0]))
test_deps = [thread_dep, test_fixtures]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment