mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 07:05:06 -05:00
test: don't download files in tests
Remove automatic download and compilation of clknetsim. If clknetsim is not found, skip all simulation tests, but don't fail "make check". Also, respect the CLKNETSIM_PATH environment variable.
This commit is contained in:
@@ -15,27 +15,11 @@
|
||||
|
||||
export LC_ALL=C
|
||||
export PATH=../../:$PATH
|
||||
export CLKNETSIM_PATH=clknetsim
|
||||
export CLKNETSIM_PATH=${CLKNETSIM_PATH:-clknetsim}
|
||||
|
||||
# Known working clknetsim revision
|
||||
clknetsim_revision=1e56224dee1db69c0027e9bd63c2a202d4765959
|
||||
clknetsim_url=https://github.com/mlichvar/clknetsim/archive/$clknetsim_revision.tar.gz
|
||||
|
||||
# Only Linux is supported
|
||||
if [ "$(uname -s)" != Linux ]; then
|
||||
echo "Simulation tests supported only on Linux"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# Try to download clknetsim if not found
|
||||
if [ ! -e $CLKNETSIM_PATH ]; then
|
||||
curl -L "$clknetsim_url" | tar xz || exit 3
|
||||
ln -s clknetsim-$clknetsim_revision clknetsim || exit 3
|
||||
fi
|
||||
|
||||
# Try to build clknetsim if not built
|
||||
if [ ! -x $CLKNETSIM_PATH/clknetsim -o ! -e $CLKNETSIM_PATH/clknetsim.so ]; then
|
||||
make -C clknetsim || exit 3
|
||||
if [ ! -x $CLKNETSIM_PATH/clknetsim ]; then
|
||||
echo "SKIP (clknetsim not found)"
|
||||
exit 9
|
||||
fi
|
||||
|
||||
. $CLKNETSIM_PATH/clknetsim.bash
|
||||
|
||||
Reference in New Issue
Block a user