Use quick install script to test R builds
This commit is contained in:
parent
df380906fb
commit
83dfc554f2
1 changed files with 103 additions and 125 deletions
26
test/test-zypper.sh
Executable file
26
test/test-zypper.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
|
||||
# Install quick install script prerequisites
|
||||
if ! command -v curl > /dev/null 2>&1; then
|
||||
zypper --non-interactive install curl
|
||||
fi
|
||||
|
||||
# Run the quick install script. Use a locally built file if present, otherwise from the CDN.
|
||||
tmpdir=$(mktemp -d)
|
||||
cp -r "${SCRIPT_DIR}/../builder/integration/tmp/${OS_IDENTIFIER}/." "$tmpdir" > /dev/null 2>&1 || true
|
||||
(cd "$tmpdir" && SCRIPT_ACTION=install R_VERSION="${R_VERSION}" RUN_UNATTENDED=1 "${SCRIPT_DIR}/../install.sh")
|
||||
|
||||
# Show RPM info
|
||||
rpm -qi "R-${R_VERSION}"
|
||||
|
||||
"${SCRIPT_DIR}/test-r.sh"
|
||||
|
||||
zypper --non-interactive remove "R-${R_VERSION}"
|
||||
|
||||
if [ -d "/opt/R/${R_VERSION}" ]; then
|
||||
echo "Failed to uninstall completely"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Reference in a new issue