[hackers] [scc] [tests] Add compose.sh || Roberto E. Vargas Caballero
commit 1915e51243e12bb5a4037d8458d53c0cc32f160e
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Dec 12 09:27:29 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Dec 12 09:27:29 2016 +0100
[tests] Add compose.sh
This script creates a program compossed of all the tests
and can be used to test the code coverage of the tests.
diff --git a/tests/compose.sh b/tests/compose.sh
new file mode 100755
index 0000000..0492fbb
--- /dev/null
+++ b/tests/compose.sh
_AT_@ -0,0 +1,23 @@
+#!/bin/sh
+
+rm -f tmp_test.c
+rm -f tests.h
+rm -f tmp_*.c
+
+(echo '#include "tests.h"'
+echo 'int main()'
+echo '{'
+
+for i in *-*.c
+do
+ n=`echo $i | sed 's/\(.*\)-.*\.c/\1/'`
+ sed s/main/main_$n/ < $i > tmp_$n.c
+ echo "int main_$n();" >> tests.h
+ echo "main_$n();"
+
+done
+
+echo 'return 0;'
+echo '}'
+) > tmp_test.c
+
Received on Mon Dec 12 2016 - 09:28:57 CET
This archive was generated by hypermail 2.3.0
: Mon Dec 12 2016 - 09:36:22 CET