#!/bin/bash
# autopkgtest check: Run cargo test on the rust_uno crate
# (c) 2025 Software in the Public Interest, Inc.
# Authors: Rene Engelhard <rene@debian.org>

set -e
set -E

SRCDIR=`pwd`
CHECK_PARALLELISM=1

echo
echo "====== Starting cargo test of rust_uno with ${CHECK_PARALLELISM} job against /usr/lib/libreoffice/program and /usr/lib/libreoffice/sdk ======"

export INSTDIR=/usr/lib/libreoffice
export LD_LIBRARY_PATH=/usr/lib/libreoffice/program
/usr/share/cargo/bin/cargo-auto-test rust-uno `grep version /usr/share/cargo/registry/rust-uno-*/Cargo.toml | awk '{ print $3 }' | sed -e s/\"//g`

