diff --git a/mozilla/js/tests/bisect.sh b/mozilla/js/tests/bisect.sh index 183d8370c20..d923f1f7ea4 100755 --- a/mozilla/js/tests/bisect.sh +++ b/mozilla/js/tests/bisect.sh @@ -41,7 +41,7 @@ if [[ -z "$TEST_DIR" ]]; then cat < /dev/null - export MOZ_CO_DATE="$bisect_bad" - eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null - bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` - if [[ -z "$bisect_log" ]]; then - echo "test $bisect_test not run." + echo "checking that the test fails in the bad revision $bisect_bad" + eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null + export MOZ_CO_DATE="$bisect_bad" + eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null + bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` + if [[ -z "$bisect_log" ]]; then + echo "test $bisect_test not run." + else + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found, bad revision $bisect_bad confirmed" + bad_confirmed=1 else - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found, bad revision $bisect_bad confirmed" - bad_confirmed=1 - else - echo "test failure $bisect_test.*$bisect_string not found, bad revision $bisect_bad *not* confirmed" - fi + echo "test failure $bisect_test.*$bisect_string not found, bad revision $bisect_bad *not* confirmed" + fi + fi + + if [[ "$bad_confirmed" != "1" ]]; then + error "bad revision not confirmed"; + fi + + echo "checking that the test passes in the good revision $bisect_good" + eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null + export MOZ_CO_DATE="$bisect_good" + eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null + + bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` + if [[ -z "$bisect_log" ]]; then + echo "test $bisect_test not run." + else + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found, good revision $bisect_good *not* confirmed" + else + echo "test failure $bisect_test.*$bisect_string not found, good revision $bisect_good confirmed" + good_confirmed=1 + fi + fi + + if [[ "$good_confirmed" != "1" ]]; then + error "good revision not confirmed"; + fi + + echo "bisecting $bisect_start to $bisect_stop" + + # + # place an array of dates of checkins into an array and + # perform a binary search on those dates. + # + declare -a seconds_array date_array + + # load the cvs checkin dates into an array. the array will look like + # date_array[i] date value + # date_array[i+1] time value + + pushd $BUILDTREE/mozilla + date_array=(`cvs -q -z3 log -N -d "$bisect_start<$bisect_stop" | grep "^date: " | sed 's|^date: \([^;]*\).*|\1|' | sort -u`) + popd + + let seconds_index=0 1 + let date_index=0 1 + + while (( $date_index < ${#date_array[@]} )); do + seconds_array[$seconds_index]=`dateparse.pl "${date_array[$date_index]} ${date_array[$date_index+1]} UTC"` + let seconds_index=$seconds_index+1 + let date_index=$date_index+2 + done + + let seconds_index_start=0 1 + let seconds_index_stop=${#seconds_array[@]} + + while true; do + + if (( $seconds_index_start+1 >= $seconds_index_stop )); then + echo "*** date `perl -e 'print scalar localtime $ARGV[0];' ${seconds_array[$seconds_index_stop]}` found ***" + break; fi - if [[ "$bad_confirmed" != "1" ]]; then - error "bad revision not confirmed"; - fi - - echo "checking that the test passes in the good revision $bisect_good" + unset result + + # clobber before setting new changeset. eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null - export MOZ_CO_DATE="$bisect_good" + + let seconds_index_middle="($seconds_index_start + $seconds_index_stop)/2" + let seconds_middle="${seconds_array[$seconds_index_middle]}" + + bisect_middle="`perl -e 'print scalar localtime $ARGV[0];' $seconds_middle`" + export MOZ_CO_DATE="$bisect_middle" + echo "testing $MOZ_CO_DATE" + eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` if [[ -z "$bisect_log" ]]; then - echo "test $bisect_test not run." + echo "test $bisect_test not run. Skipping changeset" + let seconds_index_start=$seconds_index_start+1 else - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found, good revision $bisect_good *not* confirmed" - else - echo "test failure $bisect_test.*$bisect_string not found, good revision $bisect_good confirmed" - good_confirmed=1 - fi - fi - - if [[ "$good_confirmed" != "1" ]]; then - error "good revision not confirmed"; - fi - - echo "bisecting $bisect_start to $bisect_stop" - - # - # place an array of dates of checkins into an array and - # perform a binary search on those dates. - # - declare -a seconds_array date_array - - # load the cvs checkin dates into an array. the array will look like - # date_array[i] date value - # date_array[i+1] time value - - pushd $BUILDTREE/mozilla - date_array=(`cvs -q -z3 log -N -d "$bisect_start<$bisect_stop" | grep "^date: " | sed 's|^date: \([^;]*\).*|\1|' | sort -u`) - popd - - let seconds_index=0 1 - let date_index=0 1 - - while (( $date_index < ${#date_array[@]} )); do - seconds_array[$seconds_index]=`dateparse.pl "${date_array[$date_index]} ${date_array[$date_index+1]} UTC"` - let seconds_index=$seconds_index+1 - let date_index=$date_index+2 - done - - let seconds_index_start=0 1 - let seconds_index_stop=${#seconds_array[@]} - - while true; do - - if (( $seconds_index_start+1 >= $seconds_index_stop )); then - echo "*** date `perl -e 'print scalar localtime $ARGV[0];' ${seconds_array[$seconds_index_stop]}` found ***" - break; - fi - - unset result - - # clobber before setting new changeset. - eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null - - let seconds_index_middle="($seconds_index_start + $seconds_index_stop)/2" - let seconds_middle="${seconds_array[$seconds_index_middle]}" - - bisect_middle="`perl -e 'print scalar localtime $ARGV[0];' $seconds_middle`" - export MOZ_CO_DATE="$bisect_middle" - echo "testing $MOZ_CO_DATE" - - eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null - - bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` - if [[ -z "$bisect_log" ]]; then - echo "test $bisect_test not run. Skipping changeset" - let seconds_index_start=$seconds_index_start+1 - else - if [[ "$searchtype" == "regression" ]]; then - # searching for a regression, pass -> fail - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found" - let seconds_index_stop=$seconds_index_middle; - else - echo "test failure $bisect_test.*$bisect_string not found" - let seconds_index_start=$seconds_index_middle - fi + if [[ "$searchtype" == "regression" ]]; then + # searching for a regression, pass -> fail + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found" + let seconds_index_stop=$seconds_index_middle; else - # searching for a fix, fail -> pass - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found" - let seconds_index_start=$seconds_index_middle - else - echo "test failure $bisect_test.*$bisect_string not found" - let seconds_index_stop=$seconds_index_middle - fi + echo "test failure $bisect_test.*$bisect_string not found" + let seconds_index_start=$seconds_index_middle + fi + else + # searching for a fix, fail -> pass + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found" + let seconds_index_start=$seconds_index_middle + else + echo "test failure $bisect_test.*$bisect_string not found" + let seconds_index_stop=$seconds_index_middle fi fi + fi - done - ;; + done +else + # + # binary search using mercurial + # - 1.9.1|1.9.2) - # - # binary search using mercurial - # + TEST_MOZILLA_HG_LOCAL=${TEST_MOZILLA_HG_LOCAL:-$BUILDDIR/hg.mozilla.org/`basename $TEST_MOZILLA_HG`} + hg -R $TEST_MOZILLA_HG_LOCAL pull -r tip - TEST_MOZILLA_HG_LOCAL=${TEST_MOZILLA_HG_LOCAL:-$BUILDDIR/hg.mozilla.org/`basename $TEST_MOZILLA_HG`} - hg -R $TEST_MOZILLA_HG_LOCAL pull -r tip + REPO=$BUILDTREE/mozilla + hg -R $REPO pull -r tip - REPO=$BUILDTREE/mozilla - hg -R $REPO pull -r tip + # convert revision numbers to local revision numbers for ordering + localgood=`hg -R $REPO id -n -r $bisect_good` + localbad=`hg -R $REPO id -n -r $bisect_bad` - # convert revision numbers to local revision numbers for ordering - localgood=`hg -R $REPO id -n -r $bisect_good` - localbad=`hg -R $REPO id -n -r $bisect_bad` + # if good < bad, then we are searching for a regression, + # i.e. the first bad changeset + # if bad < good, then we are searching for a fix. + # i.e. the first good changeset. so we reverse the nature + # of good and bad. - # if good < bad, then we are searching for a regression, - # i.e. the first bad changeset - # if bad < good, then we are searching for a fix. - # i.e. the first good changeset. so we reverse the nature - # of good and bad. - - if (( $localgood < $localbad )); then - cat < /dev/null + fi + hg -R $REPO update -C -r $bisect_bad + bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` + if [[ -z "$bisect_log" ]]; then + echo "test $bisect_test not run." + else + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found, bad revision $localbad:$bisect_bad confirmed" + bad_confirmed=1 + else + echo "test failure $bisect_test.*$bisect_string not found, bad revision $localbad:$bisect_bad *not* confirmed" + fi + fi + + if [[ "$bad_confirmed" != "1" ]]; then + error "bad revision not confirmed"; + fi + + echo "checking that the test passes in the good revision $localgood:$bisect_good" + if [[ -z "$bisect_depends" ]]; then + eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null + fi + hg -R $REPO update -C -r $bisect_good + bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` + if [[ -z "$bisect_log" ]]; then + echo "test $bisect_test not run." + else + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found, good revision $localgood:$bisect_good *not* confirmed" + else + echo "test failure $bisect_test.*$bisect_string not found, good revision $localgood:$bisect_good confirmed" + good_confirmed=1 + fi + fi + + if [[ "$good_confirmed" != "1" ]]; then + error "good revision not confirmed"; + fi + + echo "bisecting $REPO $bisect_start to $bisect_stop" + hg -q -R $REPO bisect --reset + hg -q -R $REPO bisect --good $bisect_start + hg -q -R $REPO bisect --bad $bisect_stop + + while true; do + unset result + + # clobber before setting new changeset. if [[ -z "$bisect_depends" ]]; then eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null fi - hg -R $REPO update -C -r $bisect_bad + + # remove extraneous in-tree changes + # See https://bugzilla.mozilla.org/show_bug.cgi?id=480680 for details + # of why this is necessary. + hg -R $REPO update -C + + hg -R $REPO bisect + # save the revision id so we can update to it discarding local + # changes in the working directory. + rev=`hg -R $REPO id -i` + bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` + # remove extraneous in-tree changes + # See https://bugzilla.mozilla.org/show_bug.cgi?id=480680 for details + # of why this is necessary. + hg -R $REPO update -C -r $rev + if [[ -z "$bisect_log" ]]; then - echo "test $bisect_test not run." + echo "test $bisect_test not run. Skipping changeset" + hg -R $REPO bisect --skip else - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found, bad revision $localbad:$bisect_bad confirmed" - bad_confirmed=1 - else - echo "test failure $bisect_test.*$bisect_string not found, bad revision $localbad:$bisect_bad *not* confirmed" - fi - fi - - if [[ "$bad_confirmed" != "1" ]]; then - error "bad revision not confirmed"; - fi - - echo "checking that the test passes in the good revision $localgood:$bisect_good" - if [[ -z "$bisect_depends" ]]; then - eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null - fi - hg -R $REPO update -C -r $bisect_good - bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` - if [[ -z "$bisect_log" ]]; then - echo "test $bisect_test not run." - else - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found, good revision $localgood:$bisect_good *not* confirmed" - else - echo "test failure $bisect_test.*$bisect_string not found, good revision $localgood:$bisect_good confirmed" - good_confirmed=1 - fi - fi - - if [[ "$good_confirmed" != "1" ]]; then - error "good revision not confirmed"; - fi - - echo "bisecting $REPO $bisect_start to $bisect_stop" - hg -q -R $REPO bisect --reset - hg -q -R $REPO bisect --good $bisect_start - hg -q -R $REPO bisect --bad $bisect_stop - - while true; do - unset result - - # clobber before setting new changeset. - if [[ -z "$bisect_depends" ]]; then - eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null - fi - - # remove extraneous in-tree changes - # See https://bugzilla.mozilla.org/show_bug.cgi?id=480680 for details - # of why this is necessary. - hg -R $REPO update -C - - hg -R $REPO bisect - # save the revision id so we can update to it discarding local - # changes in the working directory. - rev=`hg -R $REPO id -i` - - bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'` - # remove extraneous in-tree changes - # See https://bugzilla.mozilla.org/show_bug.cgi?id=480680 for details - # of why this is necessary. - hg -R $REPO update -C -r $rev - - if [[ -z "$bisect_log" ]]; then - echo "test $bisect_test not run. Skipping changeset" - hg -R $REPO bisect --skip - else - if [[ "$searchtype" == "regression" ]]; then - # searching for a regression - # the result is considered good when the test does not appear in the failure log - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found, marking revision bad" - if ! result=`hg -R $REPO bisect --bad 2>&1`; then - echo "bisect bad failed" - error "$result" - fi - else - echo "test failure $bisect_test.*$bisect_string not found, marking revision good" - if ! result=`hg -R $REPO bisect --good 2>&1`; then - echo "bisect good failed" - error "$result" - fi + if [[ "$searchtype" == "regression" ]]; then + # searching for a regression + # the result is considered good when the test does not appear in the failure log + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found, marking revision bad" + if ! result=`hg -R $REPO bisect --bad 2>&1`; then + echo "bisect bad failed" + error "$result" fi else - # searching for a fix - # the result is considered good when the test does appear in the failure log - if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then - echo "test failure $bisect_test.*$bisect_string found, marking revision good" - if ! result=`hg -R $REPO bisect --good 2>&1`; then - echo "bisect good failed" - error "$result" - fi - else - echo "test failure $bisect_test.*$bisect_string not found, marking revision bad" - if ! result=`hg -R $REPO bisect --bad 2>&1`; then - echo "bisect bad failed" - error "$result" - fi + echo "test failure $bisect_test.*$bisect_string not found, marking revision good" + if ! result=`hg -R $REPO bisect --good 2>&1`; then + echo "bisect good failed" + error "$result" + fi + fi + else + # searching for a fix + # the result is considered good when the test does appear in the failure log + if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then + echo "test failure $bisect_test.*$bisect_string found, marking revision good" + if ! result=`hg -R $REPO bisect --good 2>&1`; then + echo "bisect good failed" + error "$result" + fi + else + echo "test failure $bisect_test.*$bisect_string not found, marking revision bad" + if ! result=`hg -R $REPO bisect --bad 2>&1`; then + echo "bisect bad failed" + error "$result" fi fi fi + fi - if echo $result | egrep -q "The first (good|bad) revision is:"; then - result_revision=`echo $result | sed "s|The first .* revision is:.*changeset: [0-9]*:\([^ ]*\).*|\1|"` - echo $result | sed "s|The first .* revision is:|$searchtype|" - echo "*** revision $result_revision found ***" - break - fi + if echo $result | egrep -q "The first (good|bad) revision is:"; then + result_revision=`echo $result | sed "s|The first .* revision is:.*changeset: [0-9]*:\([^ ]*\).*|\1|"` + echo $result | sed "s|The first .* revision is:|$searchtype|" + echo "*** revision $result_revision found ***" + break + fi - done - ;; -esac + done +fi diff --git a/mozilla/js/tests/detect-universe.sh b/mozilla/js/tests/detect-universe.sh index b750a304182..878b8c47815 100755 --- a/mozilla/js/tests/detect-universe.sh +++ b/mozilla/js/tests/detect-universe.sh @@ -41,7 +41,7 @@ if [[ -z "$TEST_DIR" ]]; then cat <> $urllist echo "
  • $jsfile
  • " >> $urlhtml fi @@ -497,8 +500,8 @@ EOF if [[ -z "$filesonly" ]]; then echo "JavaScriptTest: Begin Run" - cat "$urllist" | while read url; - do + cat "$urllist" | while read url; + do edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "$url" jsfile=`echo $url | sed "s|http://$TEST_HTTP/$TEST_WWW_JS/js-test-driver-standards.html?test=\([^;]*\);.*|\1|"` echo "JavaScriptTest: Begin Test $jsfile" diff --git a/mozilla/testing/sisyphus/bin/build.sh b/mozilla/testing/sisyphus/bin/build.sh index 53f6453623a..b7cef8481aa 100755 --- a/mozilla/testing/sisyphus/bin/build.sh +++ b/mozilla/testing/sisyphus/bin/build.sh @@ -41,7 +41,7 @@ source $TEST_DIR/bin/library.sh source $TEST_DIR/bin/set-build-env.sh $@ case $product in - firefox|thunderbird|fennec) + firefox) cd $BUILDTREE/mozilla if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk build" 2>&1; then @@ -64,18 +64,10 @@ case $product in if [[ "$buildtype" == "debug" ]]; then if [[ "$product" == "firefox" ]]; then executablepath=$product-$buildtype/dist/FirefoxDebug.app/Contents/MacOS - elif [[ "$product" == "thunderbird" ]]; then - executablepath=$product-$buildtype/dist/ThunderbirdDebug.app/Contents/MacOS - elif [[ "$product" == "fennec" ]]; then - executablepath=$product-$buildtype/dist/FennecDebug.app/Contents/MacOS fi else if [[ "$product" == "firefox" ]]; then executablepath=$product-$buildtype/dist/Firefox.app/Contents/MacOS - elif [[ "$product" == "thunderbird" ]]; then - executablepath=$product-$buildtype/dist/Thunderbird.app/Contents/MacOS - elif [[ "$product" == "fennec" ]]; then - executablepath=$product-$buildtype/dist/Fennec.app/Contents/MacOS fi fi ;; @@ -84,7 +76,7 @@ case $product in ;; esac - if [[ "$OSID" != "nt" && "$product" != "fennec" ]]; then + if [[ "$OSID" != "nt" ]]; then # # patch unix-like startup scripts to exec instead of # forking new processes diff --git a/mozilla/testing/sisyphus/bin/builder.sh b/mozilla/testing/sisyphus/bin/builder.sh index 6a6aa8c4e70..a8f12ecbb37 100755 --- a/mozilla/testing/sisyphus/bin/builder.sh +++ b/mozilla/testing/sisyphus/bin/builder.sh @@ -53,8 +53,8 @@ $SCRIPT -p products -b branches -B buildcommands -T buildtypes [-e extra] [-d da variable description =============== =========================================================== --p products required. one or more of js firefox thunderbird fennec --b branches required. one or more of 1.8.0 1.8.1 1.9.0 1.9.1 1.9.2 +-p products required. one or more of js firefox +-b branches required. one or more of supported branches. see library.sh. -B buildcommands required. one or more of clean clobber checkout build -T buildtypes required. one or more of opt debug -e extra optional. extra qualifier to pick build tree and mozconfig. diff --git a/mozilla/testing/sisyphus/bin/check-spider.sh b/mozilla/testing/sisyphus/bin/check-spider.sh index b910debb6b7..c288526faee 100755 --- a/mozilla/testing/sisyphus/bin/check-spider.sh +++ b/mozilla/testing/sisyphus/bin/check-spider.sh @@ -48,21 +48,21 @@ options="p:b:x:N:d:" function usage() { cat <&1; then - error "during checkout of $project tree" $LINENO - fi - ;; - - 1.9.1|1.9.2) - - # do not use mozilla-build on windows systems as we - # must use the cygwin python with the cygwin mercurial. - - if ! python client.py checkout; then - error "during checkout of $project tree" $LINENO - fi - ;; - - *) - error "branch $branch not yet supported" - ;; - esac - ;; - - fennec) - - case $branch in - 1.9.1|1.9.2) - - # XXX need to generalize the mobile-browser repository - if [[ ! -d mobile/.hg ]]; then - if ! hg clone http://hg.mozilla.org/mobile-browser $BUILDTREE/mozilla/mobile; then - error "during hg clone of http://hg.mozilla.org/mobile-browser" $LINENO - fi - fi - - cd mobile - hg pull - if [[ "$OSID" == "nt" ]]; then - # remove spurious lock file - rm -f .hg/wlock.lnk - fi - hg update -C - - # XXX need to deal with mobile revisions from different repositories - - cd ../ - # do not use mozilla-build on windows systems as we # must use the cygwin python with the cygwin mercurial. @@ -217,14 +135,10 @@ case $product in error "during checkout of $project tree" $LINENO fi ;; - - *) - error "branch $branch not yet supported" - ;; esac ;; - js) + js) case $branch in 1.8.*|1.9.0) @@ -247,9 +161,9 @@ case $product in fi ;; - 1.9.1|1.9.2) + *) - # do not use mozilla-build on windows systems as we + # do not use mozilla-build on windows systems as we # must use the cygwin python with the cygwin mercurial. if ! python client.py checkout; then @@ -258,10 +172,6 @@ case $product in cd js/src ;; - - *) - error "branch $branch not yet supported" - ;; esac # end for js shell ;; diff --git a/mozilla/testing/sisyphus/bin/clean.sh b/mozilla/testing/sisyphus/bin/clean.sh index e18d8d7023f..b52095e420f 100755 --- a/mozilla/testing/sisyphus/bin/clean.sh +++ b/mozilla/testing/sisyphus/bin/clean.sh @@ -41,7 +41,7 @@ source $TEST_DIR/bin/library.sh source $TEST_DIR/bin/set-build-env.sh $@ case $product in - firefox|thunderbird|fennec) + firefox) if ! $buildbash $bashlogin -c "cd $BUILDTREE/mozilla; make -f client.mk clean" 2>&1; then error "during client.mk clean" $LINENO @@ -69,7 +69,7 @@ case $product in fi cd "$BUILDTREE/mozilla/js/src" - eval "$AUTOCONF" + eval "$AUTOCONF" fi diff --git a/mozilla/testing/sisyphus/bin/clobber.sh b/mozilla/testing/sisyphus/bin/clobber.sh index caf37da5020..c50e29e5565 100755 --- a/mozilla/testing/sisyphus/bin/clobber.sh +++ b/mozilla/testing/sisyphus/bin/clobber.sh @@ -43,15 +43,15 @@ source $TEST_DIR/bin/set-build-env.sh $@ if [[ ! -e "$BUILDDIR" ]]; then echo "build directory \"$BUILDDIR\" doesn't exist, ignoring clobber" exit -fi +fi case $product in - firefox|thunderbird|fennec) + firefox) if [[ ! -e "$executablepath" ]]; then echo "executable path $executablepath doesn't exist, ignoring clobber" exit - fi + fi if ! $buildbash $bashlogin -c "export PATH=\"$BUILDPATH\"; cd $BUILDTREE/mozilla; make -f client.mk clobber" 2>&1; then echo "error during client.mk clobber" $LINENO @@ -65,7 +65,7 @@ case $product in if [[ ! -e "$jsshellsourcepath" ]]; then echo "javascript shell source path $jsshellsourcepath doesn't exist, ignoring clobber" exit - fi + fi if [[ -e "$BUILDTREE/mozilla/js/src/configure.in" ]]; then rm -f $BUILDTREE/mozilla/js/src/configure fi diff --git a/mozilla/testing/sisyphus/bin/create-profile.sh b/mozilla/testing/sisyphus/bin/create-profile.sh index fa1fe8af903..d66e22f33f6 100755 --- a/mozilla/testing/sisyphus/bin/create-profile.sh +++ b/mozilla/testing/sisyphus/bin/create-profile.sh @@ -46,23 +46,23 @@ options="p:b:x:D:N:L:U:d:" function usage() { cat <&2 if [[ "$0" == "-bash" || "$0" == "bash" ]]; then return 0 fi exit 2 -} +} if [[ -z "$LIBRARYSH" ]]; then @@ -112,36 +112,22 @@ if [[ -z "$LIBRARYSH" ]]; then local branch=$2 case $product in - js|firefox|thunderbird|fennec) + js|firefox) ;; *) - error "product \"$product\" must be one of firefox, thunderbird, or fennec" $LINENO + error "product \"$product\" must be one of js or firefox" $LINENO esac case $branch in - 1.8.0|1.8.1|1.9.0|1.9.1|1.9.2) + 1.8.0|1.8.1|1.9.0|1.9.1|1.9.2|1.9.3) ;; *) - error "branch \"$branch\" must be one of 1.8.0, 1.8.1, 1.9.0 1.9.1 1.9.2" $LINENO + error "branch \"$branch\" must be one of 1.8.0 1.8.1 1.9.0 1.9.1 1.9.2 1.9.3" $LINENO esac - # special case thunderbird and fennec due to their different - # repository and build tree structures. - case "$product" in - "thunderbird") - if [[ $branch == "1.9.2" ]]; then - error "thunderbird on branch 1.9.2 is not supported" - fi - ;; - "fennec") - if [[ $branch != "1.9.1" && "$branch" != "1.9.2" ]]; then - error "fennec on branch $branch is not supported" - fi - ;; - esac - } + } - # Darwin 8.11.1's |which| does not return a non-zero exit code if the + # Darwin 8.11.1's |which| does not return a non-zero exit code if the # program can not be found. Therefore, kludge around it. findprogram() { @@ -170,14 +156,14 @@ if [[ -z "$LIBRARYSH" ]]; then } # loaddata - # + # # load data files into environment loaddata() { local datafiles="$@" local datafile if [[ -n "$datafiles" ]]; then - for datafile in $datafiles; do + for datafile in $datafiles; do if [[ ! -e "$datafile" ]]; then error "datafile $datafile does not exist" fi @@ -227,7 +213,7 @@ if [[ -z "$LIBRARYSH" ]]; then # dumpvars varname1, ... # - # dumps name=value pairs to stdout for each variable named + # dumps name=value pairs to stdout for each variable named # in argument list dumpvars() @@ -267,9 +253,6 @@ if [[ -z "$LIBRARYSH" ]]; then case "$OSID" in darwin) get_executable_filter="Contents/MacOS/$get_executable_product" - if [[ "$get_executable_product" == "thunderbird" ]]; then - get_executable_name="$get_executable_product-bin" - fi ;; *) get_executable_filter="$get_executable_product" @@ -286,7 +269,7 @@ if [[ -z "$LIBRARYSH" ]]; then error "get_executable $product $branch $executablepath returned empty path" $LINENO fi - if [[ ! -x "$executable" ]]; then + if [[ ! -x "$executable" ]]; then error "executable \"$executable\" is not executable" $LINENO fi diff --git a/mozilla/testing/sisyphus/bin/set-build-env.sh b/mozilla/testing/sisyphus/bin/set-build-env.sh index deef8646644..b056877e195 100755 --- a/mozilla/testing/sisyphus/bin/set-build-env.sh +++ b/mozilla/testing/sisyphus/bin/set-build-env.sh @@ -64,8 +64,8 @@ usage() usage: set-build-env.sh -p product -b branch -T buildtype [-e extra] --p product one of js firefox thunderbird fennec --b branch one of 1.8.0 1.8.1 1.9.0 1.9.1 1.9.2 +-p product one of js firefox. +-b branch one of supported branches. see library.sh -T buildtype one of opt debug -e extra extra qualifier to pick mozconfig and tree @@ -78,7 +78,7 @@ myexit() case $0 in *bash*) - # prevent "sourced" script calls from + # prevent "sourced" script calls from # exiting the current shell. break 99;; *) @@ -90,8 +90,8 @@ for step in step1; do # dummy loop for handling exits unset product branch buildtype extra - while getopts $options optname ; - do + while getopts $options optname ; + do case $optname in p) product=$OPTARG;; b) branch=$OPTARG;; @@ -130,8 +130,12 @@ for step in step1; do # dummy loop for handling exits elif [[ $branch == "1.9.0" ]]; then export BRANCH_CO_FLAGS=""; elif [[ $branch == "1.9.1" ]]; then + TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/releases/mozilla-1.9.1} export BRANCH_CO_FLAGS=""; elif [[ $branch == "1.9.2" ]]; then + TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/releases/mozilla-1.9.2} + export BRANCH_CO_FLAGS=""; + elif [[ $branch == "1.9.3" ]]; then TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/mozilla-central} export BRANCH_CO_FLAGS=""; else @@ -227,8 +231,9 @@ for step in step1; do # dummy loop for handling exits startbat=start-msvc71.bat fi ;; - 1.9.0|1.9.1|1.9.2) + *) # msvc8 official, vc7.1, (2003), vc9 (2009) supported + # for 1.9.0 and later if [[ -n "$VC8DIR" ]]; then startbat=start-msvc8.bat # set VCINSTALLDIR for use in detecting the MS CRT @@ -316,7 +321,7 @@ for step in step1; do # dummy loop for handling exits export buildbash="/bin/bash" export bashlogin=-l - # if a 64 bit linux system, assume the + # if a 64 bit linux system, assume the # compiler is in the standard reference # location /tools/gcc/bin/ case "$TEST_PROCESSORTYPE" in @@ -339,16 +344,7 @@ for step in step1; do # dummy loop for handling exits export CONFIG_SHELL=$buildbash export CONFIGURE_ENV_ARGS=$buildbash - # note that thunderbird and fennec based on 1.9.1 can not be contained in the - # same tree as firefox since they come from different repositories. - case "$branch-$product" in - 1.9.1-thunderbird) - export BUILDTREE="${BUILDTREE:-$BUILDDIR/$branch-$product$extra}" - ;; - *) - export BUILDTREE="${BUILDTREE:-$BUILDDIR/$branch$extra}" - ;; - esac + export BUILDTREE="${BUILDTREE:-$BUILDDIR/$branch$extra}" # # extras can't be placed in mozconfigs since not all parts @@ -400,32 +396,14 @@ for step in step1; do # dummy loop for handling exits export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/releases/mozilla-1.9.1} ;; 1.9.2) + export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/releases/mozilla-1.9.2} + ;; + 1.9.3) export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/mozilla-central} ;; esac export MOZCONFIG=${MOZCONFIG:-"$BUILDTREE/mozconfig-firefox-$OSID-$TEST_PROCESSORTYPE-$buildtype"} - elif [[ $product == "thunderbird" ]]; then - project=mail - case $branch in - 1.8.*);; - 1.9.0);; - *) - export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/comm-central} - ;; - esac - export MOZCONFIG=${MOZCONFIG:-"$BUILDTREE/mozconfig-thunderbird-$OSID-$TEST_PROCESSORTYPE-$buildtype"} - elif [[ $product == "fennec" ]]; then - project=mobile - case $branch in - 1.9.1) - export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/releases/mozilla-1.9.1} - ;; - 1.9.2) - export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/mozilla-central} - ;; - esac - export MOZCONFIG=${MOZCONFIG:-"$BUILDTREE/mozconfig-fennec-$OSID-$TEST_PROCESSORTYPE-$buildtype"} else echo "Assuming project=browser for product: $product" project=browser @@ -434,6 +412,9 @@ for step in step1; do # dummy loop for handling exits export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/releases/mozilla-1.9.1} ;; 1.9.2) + export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/releases/mozilla-1.9.2} + ;; + 1.9.3) export TEST_MOZILLA_HG=${TEST_MOZILLA_HG:-http://hg.mozilla.org/mozilla-central} ;; esac @@ -471,31 +452,13 @@ for step in step1; do # dummy loop for handling exits js) jsshellsourcepath=${jsshellsourcepath:-$BUILDTREE/mozilla/js/src} ;; - thunderbird) - profilename=${profilename:-$product-$branch$extra-profile} - profiledirectory=${profiledirectory:-/tmp/$product-$branch$extra-profile} - userpreferences=${userpreferences:-$TEST_DIR/prefs/test-user.js} - extensiondir=${extensiondir:-$TEST_DIR/xpi} - if [[ $branch == "1.8.0" || $branch = "1.8.1" || $branch == "1.9.0" ]]; then - executablepath=${executablepath:-$BUILDTREE/mozilla/$product-$buildtype/dist} - else - executablepath=${executablepath:-$BUILDTREE/mozilla/$product-$buildtype/mozilla/dist} - fi - ;; - fennec) - profilename=${profilename:-$product-$branch$extra-profile} - profiledirectory=${profiledirectory:-/tmp/$product-$branch$extra-profile} - userpreferences=${userpreferences:-$TEST_DIR/prefs/test-user.js} - extensiondir=${extensiondir:-$TEST_DIR/xpi} - executablepath=${executablepath:-$BUILDTREE/mozilla/$product-$buildtype/mobile/dist} - ;; esac if [[ -n "$datafiles" && ! -e $datafiles ]]; then # if there is not already a data file for this configuration, create it # this will save this configuration for the tester.sh and other scripts # which use datafiles for passing configuration values. - + echo product=\${product:-$product} >> $datafiles echo branch=\${branch:-$branch} >> $datafiles echo buildtype=\${buildtype:-$buildtype} >> $datafiles @@ -518,4 +481,3 @@ for step in step1; do # dummy loop for handling exits echo "mozconfig: $MOZCONFIG" cat $MOZCONFIG | sed 's/^/mozconfig: /' done - diff --git a/mozilla/testing/sisyphus/bin/test-setup.sh b/mozilla/testing/sisyphus/bin/test-setup.sh index 99680793a7a..f26ef89345d 100755 --- a/mozilla/testing/sisyphus/bin/test-setup.sh +++ b/mozilla/testing/sisyphus/bin/test-setup.sh @@ -46,20 +46,20 @@ options="p:b:u:f:c:B:T:x:N:D:L:U:E:d:" function usage() { cat<