mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-24 17:34:47 +00:00
17 lines
324 B
Bash
17 lines
324 B
Bash
|
#!/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
|