#!/usr/bin/bash
set -e
# t/multi.t writes into CWD
DIR=$(mktemp -d)
cp -a /usr/libexec/perl-CPAN-FindDependencies/* "$DIR"
pushd "$DIR"
# If run as root, Pod::Perldoc changes UID before opening a file.
# A mode of the temporary directory would prevent from accessing the file.
# CPAN RT#127153
chmod 0755 "$DIR"
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
popd
rm -r "$DIR"
