mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
Create tests/CI directory and add files used by Jenkins to build and test Asterisk. With this commit, Jenkins will run the Asterisk Unit Tests using the Jenkinsfile at tests/CI/unittests.jenkinsfile. Bash scripts to do the actual building and testing are also in the same directory. Output is placed in tests/CI/output so that directory has been added to .gitignore. Change-Id: I9448065465e6de2b878634510ace8fd1ef378608
23 lines
762 B
Bash
Executable File
23 lines
762 B
Bash
Executable File
#!/bin/bash
|
|
MAKE=`which make`
|
|
if [ x"${@}" != x ] ; then
|
|
mkdir -p "${@}"
|
|
fi
|
|
destdir=${@:+DESTDIR=${@}}
|
|
|
|
${MAKE} ${destdir} install || ${MAKE} ${destdir} NOISY_BUILD=yes install || exit 1
|
|
${MAKE} ${destdir} samples
|
|
if [ -n "${@}" ] ; then
|
|
sed -i -r -e "s@\[directories\]\(!\)@[directories]@g" $@/etc/asterisk/asterisk.conf
|
|
sed -i -r -e "s@ /(var|etc|usr)/@ ${@}/\1/@g" $@/etc/asterisk/asterisk.conf
|
|
fi
|
|
|
|
set +e
|
|
chown -R jenkins:users ${@}/var/lib/asterisk
|
|
chown -R jenkins:users ${@}/var/spool/asterisk
|
|
chown -R jenkins:users ${@}/var/log/asterisk
|
|
chown -R jenkins:users ${@}/var/run/asterisk
|
|
chown -R jenkins:users ${@}/etc/asterisk
|
|
[ ! -d ${@}/tmp/asterisk-jenkins ] && mkdir ${@}/tmp/asterisk-jenkins
|
|
chown -R jenkins:users ${@}/tmp/asterisk-jenkins
|
|
ldconfig |