apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1790989 - in /apr/tools/buildbot/macosx: ./ aprbuild.sh aprcheck.sh aprclean.sh mkramdisk.sh rmramdisk.sh setenv.sh
Date Tue, 11 Apr 2017 15:00:40 GMT
Author: brane
Date: Tue Apr 11 15:00:40 2017
New Revision: 1790989

URL: http://svn.apache.org/viewvc?rev=1790989&view=rev
Log:
Added OSX buildslave scripts.

Added:
    apr/tools/buildbot/macosx/
    apr/tools/buildbot/macosx/aprbuild.sh   (with props)
    apr/tools/buildbot/macosx/aprcheck.sh   (with props)
    apr/tools/buildbot/macosx/aprclean.sh   (with props)
    apr/tools/buildbot/macosx/mkramdisk.sh   (with props)
    apr/tools/buildbot/macosx/rmramdisk.sh   (with props)
    apr/tools/buildbot/macosx/setenv.sh

Added: apr/tools/buildbot/macosx/aprbuild.sh
URL: http://svn.apache.org/viewvc/apr/tools/buildbot/macosx/aprbuild.sh?rev=1790989&view=auto
==============================================================================
--- apr/tools/buildbot/macosx/aprbuild.sh (added)
+++ apr/tools/buildbot/macosx/aprbuild.sh Tue Apr 11 15:00:40 2017
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+set -e
+set -x
+
+scripts=$(cd $(dirname "$0") && pwd)
+
+. ${scripts}/setenv.sh
+
+${scripts}/mkramdisk.sh ${volume_name} ${ramconf}
+
+#
+# Step 0: Create a directory for the test log files
+#
+if [ -d "${abssrc}/.test-logs" ]; then
+    rm -fr "${abssrc}/.test-logs"
+fi
+mkdir "${abssrc}/.test-logs" || exit 1
+
+#
+# Step 1: Regenerate build scripts
+#
+
+echo "============ buildconf"
+cd ${abssrc}
+./buildconf
+
+#
+# Step 2: Configure
+#
+
+echo "============ configure"
+cd ${absbld}
+env CC=clang CXX=clang++ \
+${abssrc}/configure \
+    --prefix="${absbld}/.install-prefix" \
+    --enable-threads \
+    --with-devrandom=/dev/urandom
+
+test -f config.log && mv config.log "${abssrc}/.test-logs/config.log"
+
+#
+# Step 3: build
+#
+
+echo "============ make"
+cd ${absbld}
+make -j${APRBB_PARALLEL}

Propchange: apr/tools/buildbot/macosx/aprbuild.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: apr/tools/buildbot/macosx/aprcheck.sh
URL: http://svn.apache.org/viewvc/apr/tools/buildbot/macosx/aprcheck.sh?rev=1790989&view=auto
==============================================================================
--- apr/tools/buildbot/macosx/aprcheck.sh (added)
+++ apr/tools/buildbot/macosx/aprcheck.sh Tue Apr 11 15:00:40 2017
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+set -x
+
+scripts=$(cd $(dirname "$0") && pwd)
+
+. ${scripts}/setenv.sh
+
+# Run tests
+cd "${absbld}"
+make -j${APRBB_PARALLEL} check

Propchange: apr/tools/buildbot/macosx/aprcheck.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: apr/tools/buildbot/macosx/aprclean.sh
URL: http://svn.apache.org/viewvc/apr/tools/buildbot/macosx/aprclean.sh?rev=1790989&view=auto
==============================================================================
--- apr/tools/buildbot/macosx/aprclean.sh (added)
+++ apr/tools/buildbot/macosx/aprclean.sh Tue Apr 11 15:00:40 2017
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+set -e
+set -x
+
+scripts=$(cd $(dirname "$0") && pwd)
+
+. ${scripts}/setenv.sh
+
+${scripts}/rmramdisk.sh ${volume_name} ${ramconf}

Propchange: apr/tools/buildbot/macosx/aprclean.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: apr/tools/buildbot/macosx/mkramdisk.sh
URL: http://svn.apache.org/viewvc/apr/tools/buildbot/macosx/mkramdisk.sh?rev=1790989&view=auto
==============================================================================
--- apr/tools/buildbot/macosx/mkramdisk.sh (added)
+++ apr/tools/buildbot/macosx/mkramdisk.sh Tue Apr 11 15:00:40 2017
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+set -x
+
+if [ -z "$1" ]; then
+    echo "Missing parameter: volume name"
+    exit 1
+fi
+
+if [ -z "$2" ]; then
+    echo "Missing parameter: RAMdisk config file"
+    exit 1
+fi
+
+volume="/Volumes/$1"
+ramconf="$2"
+
+ramconfpath=$(dirname "${ramconf}")
+if [ ! -d "${ramconfpath}" ]; then
+    echo "Missing RAMdisk config file path: ${ramconfpath}"
+    exit 1
+fi
+if [ -f "${ramconf}" ]; then
+    echo "RAMdisk config file exists: ${ramconf}"
+    exit 1
+fi
+
+if [ -d "${volume}" ]; then
+    echo "Mount point exists: ${volume}"
+    exit 1
+fi
+
+mount | grep "^/dev/disk[0-9][0-9]* on ${volume} (hfs" >/dev/null || {
+    set -e
+    echo -n "" > "${ramconf}"
+
+    # Make sure we strip trailing spaces from the result of older
+    # versions of hduitil.
+    device=$(echo $(hdiutil attach -nomount ram://1000000))
+    newfs_hfs -M 0700 -v "$1" "${device}"
+    hdiutil mountvol "${device}"
+
+    echo -n "${device}" > "${ramconf}"
+}
+
+exit 0

Propchange: apr/tools/buildbot/macosx/mkramdisk.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: apr/tools/buildbot/macosx/rmramdisk.sh
URL: http://svn.apache.org/viewvc/apr/tools/buildbot/macosx/rmramdisk.sh?rev=1790989&view=auto
==============================================================================
--- apr/tools/buildbot/macosx/rmramdisk.sh (added)
+++ apr/tools/buildbot/macosx/rmramdisk.sh Tue Apr 11 15:00:40 2017
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+set -x
+
+if [ -z "$1" ]; then
+    echo "Missing parameter: volume name"
+    exit 1
+fi
+
+if [ -z "$2" ]; then
+    echo "Missing parameter: RAMdisk config file"
+    exit 1
+fi
+
+volume="/Volumes/$1"
+ramconf="$2"
+
+if [ ! -f "${ramconf}" ]; then
+    mount | grep "^/dev/disk[0-9][0-9]* on ${volume} (hfs" || {
+        echo "Not mounted: ${volume}"
+        exit 0
+    }
+    echo "Missing RAMdisk config file: ${ramconf}"
+    exit 1
+fi
+
+if [ ! -d "${volume}" ]; then
+    echo "Mount point missing: ${volume}"
+    exit 1
+fi
+
+device=$(cat "${ramconf}")
+devfmt=$(echo "${device}" | grep "^/dev/disk[0-9][0-9]*$")
+if [ "${device}" != "${devfmt}" ]; then
+    echo "Invalid device name: ${device}"
+    exit 1
+fi
+
+mount | grep "^${device} on ${volume} (hfs" >/dev/null && {
+    set -e
+    rm "${ramconf}"
+    hdiutil detach "${device}" -force
+}
+
+exit 0

Propchange: apr/tools/buildbot/macosx/rmramdisk.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: apr/tools/buildbot/macosx/setenv.sh
URL: http://svn.apache.org/viewvc/apr/tools/buildbot/macosx/setenv.sh?rev=1790989&view=auto
==============================================================================
--- apr/tools/buildbot/macosx/setenv.sh (added)
+++ apr/tools/buildbot/macosx/setenv.sh Tue Apr 11 15:00:40 2017
@@ -0,0 +1,51 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+## This script calls a helper that provides the folloing environemnt
+## variables:
+##
+##     PATH                     The search path
+##     APRBB_PARALLEL           Optional: parallelization; defaults to 2
+##
+## The invoking script will set local variable named ${scripts} that
+## is the absolute path the parent of this file.
+
+# Modify this to suit your deployment
+environment=$(cd "${scripts}/../.." && pwd)/environment.sh
+
+eval $(${environment})
+APRBB_PARALLEL="${APRBB_PARALLEL-2}"
+
+export PATH
+export APRBB_PARALLEL
+
+
+# Set the absolute source path
+abssrc=$(pwd)
+
+# Set the path to the RAMdisk device name file
+ramconf=$(dirname "${abssrc}")/ramdisk.conf
+
+# The RAMdisk volume name is the same as the name of the builder
+volume_name=$(basename $(dirname "${abssrc}"))
+if [ -z "${volume_name}" ]; then
+    echo "Missing config parameter: RAMdisk volume name"
+    exit 1
+fi
+
+# Set the absolute build path
+absbld="/Volumes/${volume_name}"



Mime
View raw message