14 Commits

Author SHA1 Message Date
stubbfel
30c7c93ef4 refactor output function to test_session_control_block 2018-03-31 01:05:27 +02:00
stubbfel
98ffa6508d mv BuildKernelModule and refactor run_unity_printk_test 2018-03-09 00:02:07 +01:00
stubbfel
a0bddbbda3 enable colors 2018-03-09 00:00:02 +01:00
stubbfel
a25162238b show now correct file path, test name and line number 2018-03-09 00:00:02 +01:00
stubbfel
1a37404f5e update fff und Unity 2018-03-09 00:00:02 +01:00
stubbfel
c04badcf5a add get_directory_definitions and get_directory_includes 2018-03-08 23:59:48 +01:00
stubbfel
695403d014 fix shell interpreter 2018-03-08 23:59:48 +01:00
stubbfel
52faaaff69 update kunity 2018-03-08 23:59:48 +01:00
stubbfel
66f19afb8c fix costum commant output path 2018-03-08 23:59:48 +01:00
stubbfel
7c4a1d6fe8 add stringifycation of prefix macro 2018-03-08 23:59:48 +01:00
stubbfel
80f56f28f3 add macro for prefixing test function names 2018-03-08 23:59:48 +01:00
stubbfel
cc125783a9 replace b execute process by custom command, so that we can copy files at build time 2018-03-08 23:59:48 +01:00
stubbfel
d549077c78 fix copy failure and double includes 2018-03-08 23:59:48 +01:00
stubbfel
3632dd5c39 add submodules 2018-03-08 23:43:26 +01:00
4 changed files with 32 additions and 5 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "lib/Unity"]
path = lib/Unity
url = https://github.com/ThrowTheSwitch/Unity.git
url = gitea@gitea.stubbe.rocks:3rd-party/Unity.git

View File

@@ -4,6 +4,21 @@
#include <linux/slab.h>
#include <linux/string.h>
//}
//{ local include region
//}
//{ local define region
//}
//{ local enum region
//}
//{ local typedef region
//}
//{local struct region
@@ -25,7 +40,7 @@ static result_code_e set_test_output(/*in */ const ptr_test_session_control_bloc
//{ local var region
static test_session_control_block_s prink_output = { printk_put_char, 0, 0 };
static test_session_control_block_s prink_output = { printk_put_char,0 ,0 };
static ptr_test_session_control_block_s kunity_output = &prink_output;
@@ -74,14 +89,14 @@ result_code_e run_unity_test(/* in */ const unity_test_function_ptr test_functio
return result;
}
if (output->_skip_start) {
if (output->_skip_start){
Unity.TestFile = file_name;
} else {
UnityBegin(file_name);
}
UnityDefaultTestRun(test_function, test_name, line_number);
if (!output->_skip_end) {
if (!output->_skip_end){
UNITY_END();
}

View File

@@ -3,11 +3,16 @@
#include "kunity_t.h"
//{ global include region
#include <unity.h>
//}
//{ local include region
//}
#ifdef __cplusplus
extern "C" {
#endif
//{ function region
extern void putchark(/* in */ char a);
@@ -20,4 +25,8 @@ extern result_code_e run_unity_printk_test(/* in */ const kunity_test_function_p
//}
#ifdef __cplusplus
}
#endif
#endif // KUNITY_H

View File

@@ -6,6 +6,9 @@
#include <linux/export.h>
#include <linux/types.h>
//}
//{ local include region
//}
//{ define region