summaryrefslogtreecommitdiffstats
path: root/security/nss/automation/buildbot-slave
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-06 11:46:26 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-06 11:46:26 +0100
commitf017b749ea9f1586d2308504553d40bf4cc5439d (patch)
treec6033924a0de9be1ab140596e305898c651bf57e /security/nss/automation/buildbot-slave
parent7c728b3c7680662fc4e92b5d03697b8339560b08 (diff)
downloadUXP-f017b749ea9f1586d2308504553d40bf4cc5439d.tar
UXP-f017b749ea9f1586d2308504553d40bf4cc5439d.tar.gz
UXP-f017b749ea9f1586d2308504553d40bf4cc5439d.tar.lz
UXP-f017b749ea9f1586d2308504553d40bf4cc5439d.tar.xz
UXP-f017b749ea9f1586d2308504553d40bf4cc5439d.zip
Update NSS to 3.32.1-RTM
Diffstat (limited to 'security/nss/automation/buildbot-slave')
-rwxr-xr-xsecurity/nss/automation/buildbot-slave/build.sh116
1 files changed, 112 insertions, 4 deletions
diff --git a/security/nss/automation/buildbot-slave/build.sh b/security/nss/automation/buildbot-slave/build.sh
index 0917cec6b..3fc914803 100755
--- a/security/nss/automation/buildbot-slave/build.sh
+++ b/security/nss/automation/buildbot-slave/build.sh
@@ -19,6 +19,9 @@ proc_args()
"--test-nss")
TEST_NSS=1
;;
+ "--check-abi")
+ CHECK_ABI=1
+ ;;
"--build-jss")
BUILD_JSS=1
;;
@@ -40,6 +43,7 @@ proc_args()
echo " --build-jss"
echo " --test-nss"
echo " --test-jss"
+ echo " --check-abi"
exit 1
;;
esac
@@ -215,6 +219,65 @@ test_nss()
return ${RET}
}
+check_abi()
+{
+ print_log "######## NSS ABI CHECK - ${BITS} bits - ${OPT} ########"
+ print_log "######## creating temporary HG clones ########"
+
+ rm -rf ${HGDIR}/baseline
+ mkdir ${HGDIR}/baseline
+ BASE_NSS=`cat ${HGDIR}/nss/automation/abi-check/previous-nss-release`
+ hg clone -u "${BASE_NSS}" "${HGDIR}/nss" "${HGDIR}/baseline/nss"
+ if [ $? -ne 0 ]; then
+ echo "invalid tag in automation/abi-check/previous-nss-release"
+ return 1
+ fi
+
+ BASE_NSPR=NSPR_$(head -1 ${HGDIR}/baseline/nss/automation/release/nspr-version.txt | cut -d . -f 1-2 | tr . _)_BRANCH
+ hg clone -u "${BASE_NSPR}" "${HGDIR}/nspr" "${HGDIR}/baseline/nspr"
+ if [ $? -ne 0 ]; then
+ echo "invalid tag ${BASE_NSPR} derived from ${BASE_NSS} automation/release/nspr-version.txt"
+ return 1
+ fi
+
+ print_log "######## building older NSPR/NSS ########"
+ pushd ${HGDIR}/baseline/nss
+
+ print_log "$ ${MAKE} ${NSS_BUILD_TARGET}"
+ ${MAKE} ${NSS_BUILD_TARGET} 2>&1 | tee -a ${LOG_ALL}
+ RET=$?
+ print_result "NSS - build - ${BITS} bits - ${OPT}" ${RET} 0
+ if [ ${RET} -ne 0 ]; then
+ tail -100 ${LOG_ALL}
+ return ${RET}
+ fi
+ popd
+
+ ABI_REPORT=${OUTPUTDIR}/abi-diff.txt
+ rm -f ${ABI_REPORT}
+ PREVDIST=${HGDIR}/baseline/dist
+ NEWDIST=${HGDIR}/dist
+ ALL_SOs="libfreebl3.so libfreeblpriv3.so libnspr4.so libnss3.so libnssckbi.so libnssdbm3.so libnsssysinit.so libnssutil3.so libplc4.so libplds4.so libsmime3.so libsoftokn3.so libssl3.so"
+ for SO in ${ALL_SOs}; do
+ if [ ! -f nss/automation/abi-check/expected-report-$SO.txt ]; then
+ touch nss/automation/abi-check/expected-report-$SO.txt
+ fi
+ abidiff --hd1 $PREVDIST/public/ --hd2 $NEWDIST/public \
+ $PREVDIST/*/lib/$SO $NEWDIST/*/lib/$SO \
+ > nss/automation/abi-check/new-report-$SO.txt
+ diff -u nss/automation/abi-check/expected-report-$SO.txt \
+ nss/automation/abi-check/new-report-$SO.txt >> ${ABI_REPORT}
+ done
+
+ if [ -s ${ABI_REPORT} ]; then
+ print_log "FAILED: there are new unexpected ABI changes"
+ cat ${ABI_REPORT}
+ return 1
+ fi
+
+ return 0
+}
+
test_jss()
{
print_log "######## JSS - tests - ${BITS} bits - ${OPT} ########"
@@ -243,6 +306,39 @@ test_jss()
return ${RET}
}
+create_objdir_dist_link()
+{
+ # compute relevant 'dist' OBJDIR_NAME subdirectory names for JSS and NSS
+ OS_TARGET=`uname -s`
+ OS_RELEASE=`uname -r | sed 's/-.*//' | sed 's/-.*//' | cut -d . -f1,2`
+ CPU_TAG=_`uname -m`
+ # OBJDIR_NAME_COMPILER appears to be defined for NSS but not JSS
+ OBJDIR_NAME_COMPILER=_cc
+ LIBC_TAG=_glibc
+ IMPL_STRATEGY=_PTH
+ if [ "${RUN_BITS}" = "64" ]; then
+ OBJDIR_TAG=_${RUN_BITS}_${RUN_OPT}.OBJ
+ else
+ OBJDIR_TAG=_${RUN_OPT}.OBJ
+ fi
+
+ # define NSS_OBJDIR_NAME
+ NSS_OBJDIR_NAME=${OS_TARGET}${OS_RELEASE}${CPU_TAG}${OBJDIR_NAME_COMPILER}
+ NSS_OBJDIR_NAME=${NSS_OBJDIR_NAME}${LIBC_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}
+ print_log "create_objdir_dist_link(): NSS_OBJDIR_NAME='${NSS_OBJDIR_NAME}'"
+
+ # define JSS_OBJDIR_NAME
+ JSS_OBJDIR_NAME=${OS_TARGET}${OS_RELEASE}${CPU_TAG}
+ JSS_OBJDIR_NAME=${JSS_OBJDIR_NAME}${LIBC_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}
+ print_log "create_objdir_dist_link(): JSS_OBJDIR_NAME='${JSS_OBJDIR_NAME}'"
+
+ if [ -e "${HGDIR}/dist/${NSS_OBJDIR_NAME}" ]; then
+ SOURCE=${HGDIR}/dist/${NSS_OBJDIR_NAME}
+ TARGET=${HGDIR}/dist/${JSS_OBJDIR_NAME}
+ ln -s ${SOURCE} ${TARGET} >/dev/null 2>&1
+ fi
+}
+
build_and_test()
{
if [ -n "${BUILD_NSS}" ]; then
@@ -255,7 +351,13 @@ build_and_test()
[ $? -eq 0 ] || return 1
fi
+ if [ -n "${CHECK_ABI}" ]; then
+ check_abi
+ [ $? -eq 0 ] || return 1
+ fi
+
if [ -n "${BUILD_JSS}" ]; then
+ create_objdir_dist_link
build_jss
[ $? -eq 0 ] || return 1
fi
@@ -326,6 +428,7 @@ main()
{
VALID=0
RET=1
+ FAIL=0
for BITS in 32 64; do
echo ${RUN_BITS} | grep ${BITS} > /dev/null
@@ -338,7 +441,10 @@ main()
set_env
run_all
RET=$?
- print_log "### result of run_all is ${RET}"
+ print_log "### result of run_all is ${RET}"
+ if [ ${RET} -ne 0 ]; then
+ FAIL=${RET}
+ fi
done
done
@@ -347,7 +453,7 @@ main()
return 1
fi
- return ${RET}
+ return ${FAIL}
}
#function killallsub()
@@ -375,6 +481,8 @@ echo "tinderbox args: $0 $@"
proc_args "$@"
main
-#RET=$?
+RET=$?
+print_log "### result of main is ${RET}"
+
#rm $IS_RUNNING_FILE
-#exit ${RET}
+exit ${RET}