Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: gdb/testsuite/dg-extract-results.sh

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/configure.ac ('k') | gdb/testsuite/gdb.ada/Makefile.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /bin/sh 1 #! /bin/sh
2 2
3 # For a specified tool and optional list of test variants, extract 3 # For a specified tool and optional list of test variants, extract
4 # test results from one or more test summary (.sum) files and combine 4 # test results from one or more test summary (.sum) files and combine
5 # the results into a new test summary file, sent to the standard output. 5 # the results into a new test summary file, sent to the standard output.
6 # The resulting file can be used with test result comparison scripts for 6 # The resulting file can be used with test result comparison scripts for
7 # results from tests that were run in parallel. See usage() below. 7 # results from tests that were run in parallel. See usage() below.
8 8
9 # Copyright (C) 2008-2010, 2012 Free Software Foundation, Inc. 9 # Copyright (C) 2008-2010, 2012 Free Software Foundation, Inc.
10 # Contributed by Janis Johnson <janis187@us.ibm.com> 10 # Contributed by Janis Johnson <janis187@us.ibm.com>
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 } 339 }
340 EOF 340 EOF
341 341
342 SUMS_AWK=${TMP}/sums.awk 342 SUMS_AWK=${TMP}/sums.awk
343 rm -f $SUMS_AWK 343 rm -f $SUMS_AWK
344 cat << EOF > $SUMS_AWK 344 cat << EOF > $SUMS_AWK
345 BEGIN { 345 BEGIN {
346 variant="$VAR" 346 variant="$VAR"
347 tool="$TOOL" 347 tool="$TOOL"
348 passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; unsupcnt=0; unrescnt =0; 348 passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt =0; unrescnt=0;
349 curvar=""; insummary=0 349 curvar=""; insummary=0
350 } 350 }
351 /^Running target / { curvar = \$3; next } 351 /^Running target / { curvar = \$3; next }
352 /^# of / { if (variant == curvar) insummary = 1 } 352 /^# of / { if (variant == curvar) insummary = 1 }
353 /^# of expected passes/ { if (insummary == 1) passcnt += \$5; next; } 353 /^# of expected passes/ { if (insummary == 1) passcnt += \$5; next; }
354 /^# of unexpected successes/ { if (insummary == 1) xpasscnt += \$5; next; } 354 /^# of unexpected successes/ { if (insummary == 1) xpasscnt += \$5; next; }
355 /^# of unexpected failures/ { if (insummary == 1) failcnt += \$5; next; } 355 /^# of unexpected failures/ { if (insummary == 1) failcnt += \$5; next; }
356 /^# of expected failures/ { if (insummary == 1) xfailcnt += \$5; next; } 356 /^# of expected failures/ { if (insummary == 1) xfailcnt += \$5; next; }
357 /^# of known failures/ { if (insummary == 1) kfailcnt += \$5; next; }
357 /^# of untested testcases/ { if (insummary == 1) untstcnt += \$5; next; } 358 /^# of untested testcases/ { if (insummary == 1) untstcnt += \$5; next; }
358 /^# of unresolved testcases/ { if (insummary == 1) unrescnt += \$5; next; } 359 /^# of unresolved testcases/ { if (insummary == 1) unrescnt += \$5; next; }
359 /^# of unsupported tests/ { if (insummary == 1) unsupcnt += \$5; next; } 360 /^# of unsupported tests/ { if (insummary == 1) unsupcnt += \$5; next; }
360 /^$/ { if (insummary == 1) 361 /^$/ { if (insummary == 1)
361 { insummary = 0; curvar = "" } 362 { insummary = 0; curvar = "" }
362 next 363 next
363 } 364 }
364 { next } 365 { next }
365 END { 366 END {
366 printf ("\t\t=== %s Summary for %s ===\n\n", tool, variant) 367 printf ("\t\t=== %s Summary for %s ===\n\n", tool, variant)
367 if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt) 368 if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
368 if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt) 369 if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
369 if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt) 370 if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
370 if (xfailcnt != 0) printf ("# of expected failures\t\t%d\n", xfailcnt) 371 if (xfailcnt != 0) printf ("# of expected failures\t\t%d\n", xfailcnt)
372 if (kfailcnt != 0) printf ("# of known failures\t\t%d\n", kfailcnt)
371 if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt) 373 if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
372 if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt) 374 if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
373 if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt) 375 if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt)
374 } 376 }
375 EOF 377 EOF
376 378
377 PVAR=`echo $VAR | sed 's,/,.,g'` 379 PVAR=`echo $VAR | sed 's,/,.,g'`
378 TMPFILE=${TMP}/var-$PVAR 380 TMPFILE=${TMP}/var-$PVAR
379 rm -f $TMPFILE 381 rm -f $TMPFILE
380 rm -f ${TMP}/list* 382 rm -f ${TMP}/list*
381 cat ${TMP}/expfiles $SUM_FILES | $AWK -f $GUTS_AWK 383 cat ${TMP}/expfiles $SUM_FILES | $AWK -f $GUTS_AWK
382 cat $SUM_FILES | $AWK -f $SUMS_AWK > $TMPFILE 384 cat $SUM_FILES | $AWK -f $SUMS_AWK > $TMPFILE
383 # If there are multiple variants, output the counts for this one; 385 # If there are multiple variants, output the counts for this one;
384 # otherwise there will just be the final counts at the end. 386 # otherwise there will just be the final counts at the end.
385 test $VARIANT_COUNT -eq 1 || cat $TMPFILE 387 test $VARIANT_COUNT -eq 1 || cat $TMPFILE
386 done 388 done
387 389
388 # Set up an awk script to get the combined summary counts for the tool. 390 # Set up an awk script to get the combined summary counts for the tool.
389 391
390 TOTAL_AWK=${TMP}/total.awk 392 TOTAL_AWK=${TMP}/total.awk
391 cat << EOF > $TOTAL_AWK 393 cat << EOF > $TOTAL_AWK
392 BEGIN { 394 BEGIN {
393 tool="$TOOL" 395 tool="$TOOL"
394 passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; unsupcnt=0; unrescnt =0 396 passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt =0; unrescnt=0
395 } 397 }
396 /^# of expected passes/ { passcnt += \$5 } 398 /^# of expected passes/ { passcnt += \$5 }
397 /^# of unexpected failures/ { failcnt += \$5 } 399 /^# of unexpected failures/ { failcnt += \$5 }
398 /^# of unexpected successes/ { xpasscnt += \$5 } 400 /^# of unexpected successes/ { xpasscnt += \$5 }
399 /^# of expected failures/ { xfailcnt += \$5 } 401 /^# of expected failures/ { xfailcnt += \$5 }
402 /^# of known failures/ { kfailcnt += \$5 }
400 /^# of untested testcases/ { untstcnt += \$5 } 403 /^# of untested testcases/ { untstcnt += \$5 }
401 /^# of unresolved testcases/ { unrescnt += \$5 } 404 /^# of unresolved testcases/ { unrescnt += \$5 }
402 /^# of unsupported tests/ { unsupcnt += \$5 } 405 /^# of unsupported tests/ { unsupcnt += \$5 }
403 END { 406 END {
404 printf ("\n\t\t=== %s Summary ===\n\n", tool) 407 printf ("\n\t\t=== %s Summary ===\n\n", tool)
405 if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt) 408 if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
406 if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt) 409 if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
407 if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt) 410 if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
408 if (xfailcnt != 0) printf ("# of expected failures\t\t%d\n", xfailcnt) 411 if (xfailcnt != 0) printf ("# of expected failures\t\t%d\n", xfailcnt)
412 if (kfailcnt != 0) printf ("# of known failures\t\t%d\n", kfailcnt)
409 if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt) 413 if (untstcnt != 0) printf ("# of untested testcases\t\t%d\n", untstcnt)
410 if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt) 414 if (unrescnt != 0) printf ("# of unresolved testcases\t%d\n", unrescnt)
411 if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt) 415 if (unsupcnt != 0) printf ("# of unsupported tests\t\t%d\n", unsupcnt)
412 } 416 }
413 EOF 417 EOF
414 418
415 # Find the total summaries for the tool and add to the end of the output. 419 # Find the total summaries for the tool and add to the end of the output.
416 cat ${TMP}/var-* | $AWK -f $TOTAL_AWK 420 cat ${TMP}/var-* | $AWK -f $TOTAL_AWK
417 421
418 # This is ugly, but if there's version output from the compiler under test 422 # This is ugly, but if there's version output from the compiler under test
419 # at the end of the file, we want it. The other thing that might be there 423 # at the end of the file, we want it. The other thing that might be there
420 # is the final summary counts. 424 # is the final summary counts.
421 tail -2 $FIRST_SUM | grep -q '^#' || tail -2 $FIRST_SUM 425 tail -2 $FIRST_SUM | grep -q '^#' || tail -2 $FIRST_SUM
422 426
423 exit 0 427 exit 0
OLDNEW
« no previous file with comments | « gdb/testsuite/configure.ac ('k') | gdb/testsuite/gdb.ada/Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698