Skip to content

Commit 6fe10b1

Browse files
committed
installts: Fix test suite installation issues.
* Apply unmerged patch to fix SIPP compilation and python3 detection in Asterisk test suite * Abort if test suite installation exits nonzero * Perform shallow clones of repositories to speed up download
1 parent 67fe8a4 commit 6fe10b1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

phreaknet.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,16 @@ install_testsuite_itself() {
11061106
fi
11071107
cd testsuite
11081108

1109+
# Apply patch if needed to fix SIPP compilation and python3 detection
1110+
grep "3.5.2" contrib/scripts/install_prereq
1111+
$WGET https://patch-diff.githubusercontent.com/raw/asterisk/testsuite/pull/48.patch
1112+
git apply 48.patch
1113+
11091114
./contrib/scripts/install_prereq install
1115+
if [ $? -ne 0 ]; then
1116+
die "Failed to install test suite"
1117+
fi
1118+
11101119
# In theory, the below is not necessary:
11111120
pip3 install pyyaml
11121121
pip3 install twisted
@@ -1148,6 +1157,7 @@ install_testsuite() { # $1 = $FORCE_INSTALL
11481157
return 1
11491158
fi
11501159
cd $AST_SOURCE_PARENT_DIR/$AST_SRC_DIR
1160+
# Ensure we're compiled with dev mode, or recompile in dev mode if needed
11511161
configure_devmode
11521162
make
11531163
make install
@@ -2343,7 +2353,7 @@ get_source() {
23432353
git reset --hard origin/master
23442354
cd ..
23452355
else
2346-
git clone "https://github.com/asterisk/asterisk"
2356+
git clone --depth=1 "https://github.com/asterisk/asterisk"
23472357
mv asterisk asterisk-git
23482358
fi
23492359
if [ $? -ne 0 ]; then
@@ -2367,7 +2377,7 @@ get_source() {
23672377
exit 1
23682378
fi
23692379
if [ "$CHAN_SCCP" = "1" ]; then
2370-
git clone https://github.com/chan-sccp/chan-sccp.git chan-sccp
2380+
git clone --depth=1 https://github.com/chan-sccp/chan-sccp.git chan-sccp
23712381
fi
23722382

23732383
if [ "$AST_ALT_VER" = "git" ]; then

0 commit comments

Comments
 (0)