llvm/tests/regression-tests/runtest.sh
Petr Šabata cd7e47d883 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/llvm#f5cf5703840587f202de6d09456fd611b5bb8b48
2020-10-15 18:27:01 +02:00

17 lines
324 B
Bash
Executable File

#!/bin/bash
set -ex
cmd='/usr/libexec/tests/llvm/run-lit-tests --threads 1'
if [ `id -u` -eq 0 ]; then
# lit tests can't be run as root, so we need to run as a different user
user='llvm-regression-tests'
if ! id -u $user; then
useradd $user
fi
su $user -c "$cmd"
cmd="su $user -c $cmd"
else
exec $cmd
fi