Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Bug 1242565 - refactor gtests, r=mt
- Loading branch information
1 parent
798ea48
commit 418e67f
Showing
16 changed files
with
96 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#! /bin/bash | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
######################################################################## | ||
# | ||
# similar to all.sh this file runs drives gtests. | ||
# | ||
# needs to work on all Unix and Windows platforms | ||
# | ||
# special strings | ||
# --------------- | ||
# FIXME ... known problems, search for this string | ||
# NOTE .... unexpected behavior | ||
# | ||
######################################################################## | ||
|
||
############################## gtest_init ############################## | ||
# local shell function to initialize this script | ||
######################################################################## | ||
gtest_init() | ||
{ | ||
cd "$(dirname "$1")" | ||
if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then | ||
cd common | ||
. ./init.sh | ||
fi | ||
|
||
SCRIPTNAME=gtests.sh | ||
|
||
if [ -z "${CLEANUP}" ] ; then # if nobody else is responsible for | ||
CLEANUP="${SCRIPTNAME}" # cleaning this script will do it | ||
fi | ||
} | ||
|
||
########################## gtest_start ############################# | ||
# Local function to actually start the test | ||
#################################################################### | ||
gtest_start() | ||
{ | ||
echo "gtests: ${GTESTS}" | ||
for i in ${GTESTS}; do | ||
GTESTDIR="${HOSTDIR}/$i" | ||
html_head "$i" | ||
if [ ! -d "$GTESTDIR" ]; then | ||
mkdir -p "$GTESTDIR" | ||
fi | ||
cd "$GTESTDIR" | ||
GTESTREPORT="$GTESTDIR/report.xml" | ||
${BINDIR}/$i -d "$GTESTDIR" --gtest_output=xml:"${GTESTREPORT}" | ||
echo "test output dir: ${GTESTREPORT}" | ||
html_msg $? 0 "$i run successfully" | ||
sed -f ${COMMON}/parsegtestreport.sed "${GTESTREPORT}" | \ | ||
while read result name; do | ||
if [ "$result" = "notrun" ]; then | ||
echo "$name" SKIPPED | ||
elif [ "$result" = "run" ]; then | ||
html_passed "$name" > /dev/null | ||
else | ||
html_failed "$name" | ||
fi | ||
done | ||
done | ||
} | ||
|
||
gtest_cleanup() | ||
{ | ||
html "</TABLE><BR>" | ||
cd ${QADIR} | ||
. common/cleanup.sh | ||
} | ||
|
||
################## main ################################################# | ||
GTESTS="der_gtest pk11_gtest util_gtest" | ||
gtest_init $0 | ||
gtest_start | ||
gtest_cleanup |
Oops, something went wrong.