summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Engert <kaie@kuix.de>2017-05-22 20:16:58 +0200
committerKai Engert <kaie@kuix.de>2017-05-22 20:16:58 +0200
commit36245f76297988f6abde4a62df919471fe47f0a4 (patch)
tree8736ab8d548d64768458b36f13849df955bdc116
parent2416bb2c6d1d30692cd9b91eb87f2c0b99c0bcfd (diff)
downloadnss-hg-36245f76297988f6abde4a62df919471fe47f0a4.tar.gz
Bug 1366761, Add automatic checks for new ABI changes to automation/buildbot-slave/build.sh, r=me
-rw-r--r--automation/abi-check/expected-report-libfreebl3.so.txt0
-rw-r--r--automation/abi-check/expected-report-libfreeblpriv3.so.txt0
-rw-r--r--automation/abi-check/expected-report-libnspr4.so.txt0
-rw-r--r--automation/abi-check/expected-report-libnss3.so.txt0
-rw-r--r--automation/abi-check/expected-report-libnssckbi.so.txt0
-rw-r--r--automation/abi-check/expected-report-libnssdbm3.so.txt0
-rw-r--r--automation/abi-check/expected-report-libnsssysinit.so.txt0
-rw-r--r--automation/abi-check/expected-report-libnssutil3.so.txt0
-rw-r--r--automation/abi-check/expected-report-libplc4.so.txt0
-rw-r--r--automation/abi-check/expected-report-libplds4.so.txt0
-rw-r--r--automation/abi-check/expected-report-libsmime3.so.txt0
-rw-r--r--automation/abi-check/expected-report-libsoftokn3.so.txt0
-rw-r--r--automation/abi-check/expected-report-libssl3.so.txt0
-rw-r--r--automation/abi-check/previous-nspr-release1
-rw-r--r--automation/abi-check/previous-nss-release1
-rwxr-xr-xautomation/buildbot-slave/build.sh95
16 files changed, 93 insertions, 4 deletions
diff --git a/automation/abi-check/expected-report-libfreebl3.so.txt b/automation/abi-check/expected-report-libfreebl3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libfreebl3.so.txt
diff --git a/automation/abi-check/expected-report-libfreeblpriv3.so.txt b/automation/abi-check/expected-report-libfreeblpriv3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libfreeblpriv3.so.txt
diff --git a/automation/abi-check/expected-report-libnspr4.so.txt b/automation/abi-check/expected-report-libnspr4.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libnspr4.so.txt
diff --git a/automation/abi-check/expected-report-libnss3.so.txt b/automation/abi-check/expected-report-libnss3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libnss3.so.txt
diff --git a/automation/abi-check/expected-report-libnssckbi.so.txt b/automation/abi-check/expected-report-libnssckbi.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libnssckbi.so.txt
diff --git a/automation/abi-check/expected-report-libnssdbm3.so.txt b/automation/abi-check/expected-report-libnssdbm3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libnssdbm3.so.txt
diff --git a/automation/abi-check/expected-report-libnsssysinit.so.txt b/automation/abi-check/expected-report-libnsssysinit.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libnsssysinit.so.txt
diff --git a/automation/abi-check/expected-report-libnssutil3.so.txt b/automation/abi-check/expected-report-libnssutil3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libnssutil3.so.txt
diff --git a/automation/abi-check/expected-report-libplc4.so.txt b/automation/abi-check/expected-report-libplc4.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libplc4.so.txt
diff --git a/automation/abi-check/expected-report-libplds4.so.txt b/automation/abi-check/expected-report-libplds4.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libplds4.so.txt
diff --git a/automation/abi-check/expected-report-libsmime3.so.txt b/automation/abi-check/expected-report-libsmime3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libsmime3.so.txt
diff --git a/automation/abi-check/expected-report-libsoftokn3.so.txt b/automation/abi-check/expected-report-libsoftokn3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libsoftokn3.so.txt
diff --git a/automation/abi-check/expected-report-libssl3.so.txt b/automation/abi-check/expected-report-libssl3.so.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/automation/abi-check/expected-report-libssl3.so.txt
diff --git a/automation/abi-check/previous-nspr-release b/automation/abi-check/previous-nspr-release
new file mode 100644
index 000000000..8e1a5fdcd
--- /dev/null
+++ b/automation/abi-check/previous-nspr-release
@@ -0,0 +1 @@
+NSPR_4_14_BRANCH
diff --git a/automation/abi-check/previous-nss-release b/automation/abi-check/previous-nss-release
new file mode 100644
index 000000000..1445e74b1
--- /dev/null
+++ b/automation/abi-check/previous-nss-release
@@ -0,0 +1 @@
+NSS_3_30_BRANCH
diff --git a/automation/buildbot-slave/build.sh b/automation/buildbot-slave/build.sh
index 7f1a960be..3dc99b1e7 100755
--- a/automation/buildbot-slave/build.sh
+++ b/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,78 @@ test_nss()
return ${RET}
}
+check_abi()
+{
+ print_log "######## NSS ABI CHECK - ${BITS} bits - ${OPT} ########"
+ rm -rf ${HGDIR}/baseline
+ mkdir ${HGDIR}/baseline
+ hg clone ${HGDIR}/nspr ${HGDIR}/baseline/nspr
+ hg clone ${HGDIR}/nss ${HGDIR}/baseline/nss
+ BASE_PR=`cat ${HGDIR}/nss/automation/abi-check/previous-nspr-release`
+ BASE_S=`cat ${HGDIR}/nss/automation/abi-check/previous-nss-release`
+
+ print_log "######## creating temporary HG clones ########"
+
+ cd ${HGDIR}/baseline/nspr
+ hg update $BASE_PR
+ if [ $? -ne 0 ]; then
+ echo "invalid tag in automation/abi-check/previous-nspr-release"
+ return 1
+ fi
+ cd ../..
+
+ cd ${HGDIR}/baseline/nss
+ hg update $BASE_S
+ if [ $? -ne 0 ]; then
+ echo "invalid tag in automation/abi-check/previous-nss-release"
+ return 1
+ fi
+ cd ../..
+
+ print_log "######## building older NSPR/NSS ########"
+
+ print_log "$ pushd ${HGDIR}/baseline/nss"
+ pushd ${HGDIR}/baseline/nss
+
+ print_log "$ ${MAKE} ${NSS_BUILD_TARGET}"
+ #${MAKE} ${NSS_BUILD_TARGET} 2>&1 | tee -a ${LOG_ALL} | grep ${GREP_BUFFER} "^${MAKE}"
+ ${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
+
+ print_log "$ popd"
+ 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} ########"
@@ -288,6 +364,11 @@ 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
@@ -360,6 +441,7 @@ main()
{
VALID=0
RET=1
+ FAIL=0
for BITS in 32 64; do
echo ${RUN_BITS} | grep ${BITS} > /dev/null
@@ -372,7 +454,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
@@ -381,7 +466,7 @@ main()
return 1
fi
- return ${RET}
+ return ${FAIL}
}
#function killallsub()
@@ -409,6 +494,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}