Updates to unit test script
authorSami Rämö <sami.ramo@ixonos.com>
Thu, 12 Aug 2010 07:05:31 +0000 (10:05 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Thu, 12 Aug 2010 07:05:31 +0000 (10:05 +0300)
 - Output filtering patterns are now in separate file, so adding
   more of them is easy

 - Output is more clear in scratchbox

 - Added some parameters for make; running 3 threads and not so verbose
   output

scripts/filtering_patterns_for_unit_tests_output.txt [new file with mode: 0644]
scripts/run_unit_tests.sh

diff --git a/scripts/filtering_patterns_for_unit_tests_output.txt b/scripts/filtering_patterns_for_unit_tests_output.txt
new file mode 100644 (file)
index 0000000..94ffde4
--- /dev/null
@@ -0,0 +1,2 @@
+atk_object_set_name..assertion
+gtk_widget_set_sensitive: assertion
index dae1672..fa2d8dd 100755 (executable)
@@ -9,6 +9,10 @@ REPORT_FILE="unit_test_results.txt"
 TEMP_FILE_EXEC_NOT_FOUND="temp_exec_not_found.txt"
 TEMP_REPORT_FILE="temp_report.txt"
 
+MAKE_OPTIONS="-j3 -k -s -w"
+
+SCRIPT_DIR=(`pwd`)
+
 # check that directories are found
 if [[ -d $REPORT_PATH && -d $UNIT_TESTS_ROOT_DIR ]]; then
     # convert relational paths to absolute ones
@@ -49,7 +53,7 @@ if [[ -d $REPORT_PATH && -d $UNIT_TESTS_ROOT_DIR ]]; then
     # run qmake
     cd $UNIT_TESTS_ROOT_DIR_ABSOLUTE
     qmake -r
-    make
+    make $MAKE_OPTIONS
     cd -
 
     echo ""
@@ -67,11 +71,12 @@ if [[ -d $REPORT_PATH && -d $UNIT_TESTS_ROOT_DIR ]]; then
                 # go to unit test directory
                 cd "`echo $PROJECT | grep --perl-regexp -o .*\(?=/\)`"
                 # run unit test, save to temp file, ignore strerr stream
-                $PROJECT -silent -o $REPORT_PATH_ABSOLUTE/$TEMP_REPORT_FILE 2>&1 | grep -v "atk_object_set_name..assertion"
+                $PROJECT -silent -o $REPORT_PATH_ABSOLUTE/$TEMP_REPORT_FILE 2>&1 | grep -v -f $SCRIPT_DIR/filtering_patterns_for_unit_tests_output.txt
                 cd - > /dev/null
                 # print to screen and append to summary
                 cat $REPORT_PATH_ABSOLUTE/$TEMP_REPORT_FILE
                 cat $REPORT_PATH_ABSOLUTE/$TEMP_REPORT_FILE >> $REPORT_PATH_ABSOLUTE/$REPORT_FILE
+                echo ""
                 echo "" >> $REPORT_PATH_ABSOLUTE/$REPORT_FILE
             else
                 # save path of missing test to temporary file