diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-18 17:53:35 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-19 19:27:29 +0900 |
commit | c0a6f1b84c84749908961579b84513fd9f9d9eac (patch) | |
tree | ace7ba60cb031acd3a1f4ff10f7bbc5668fa801f /debian/uncrustify-trinity/uncrustify-trinity-0.78.0/scripts/add_test_list.awk | |
parent | 52e5ffe140f0f4402e97936447bc9a606045d2b5 (diff) | |
download | extra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.tar.gz extra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.zip |
uncrustify-trinity: updated based on upstream version 0.78.0
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.0/scripts/add_test_list.awk')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.0/scripts/add_test_list.awk | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/scripts/add_test_list.awk b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/scripts/add_test_list.awk new file mode 100644 index 00000000..1fbe2840 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/scripts/add_test_list.awk @@ -0,0 +1,56 @@ +BEGIN { + Test_Count = 0; + count_cpp = split(sources_cpp, source_list_cpp, " "); + printf("#count_cpp= %d\n", count_cpp); + count_h = split(sources_h, source_list_h, " "); + printf("#count_h= %d\n", count_h); +} +{ + theLine = $0; + command = substr(theLine, 10); + split(command, parts, " "); + number = parts[1]; + lang = substr(parts[4], 14); + l_lang = length(lang); + lang_2 = substr(lang, 1, l_lang - 1); + config = substr(parts[5], 16); + input_file = substr(parts[7], 15); + + printf("echo \"Run uncrustify: The TESTNUMBER is %s\"\n", number); + printf("rm -rf %s\n", number); + printf("mkdir %s\n", number); + printf("cd %s\n", number); + printf("mkdir save\n"); + printf("../uncrustify -q -c \"../../tests/%s -f \"../../tests/%s -l %s -o /dev/null\n", + config, input_file, lang_2); + for (i = 1; i <= count_cpp; i++) { + source_file = source_list_cpp[i]; + function_file = sprintf("../CMakeFiles/uncrustify.dir/src/%s.gcno", source_file); + printf("if [ -s %s ] ;\n", function_file); + printf("then\n"); + printf(" gcov %s 2> /dev/null 1> /dev/null\n", function_file, source_file); + printf("fi\n"); + printf("if [ -s %s.* ] ;\n", source_file); + printf("then\n"); + printf(" mv -f %s.* ./save/\n", source_file); + printf("fi\n"); + } + for (i = 1; i <= count_h; i++) { + source_file = source_list_h[i]; + printf("if [ -s %s.* ] ;\n", source_file); + printf("then\n"); + printf(" mv -f %s.* ./save/\n", source_file); + printf("fi\n"); + } + printf(" rm *.gcov\n"); + printf(" mv save/* .\n"); + printf("rmdir save\n"); + printf("cd ..\n\n"); + # to brake before the end + #Test_Count = Test_Count + 1; + #if ( Test_Count == 1000) { + #if ( Test_Count == 109) { + #if ( Test_Count == 2) { + # printf("exit\n"); + #} +} |