![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/thread-self/root/usr/lib/llvm-10/build/utils/lit/utils/ |
Upload File : |
#!/bin/sh prog=$(basename $0) # Expect to be run from the parent lit directory. if [ ! -f setup.py ] || [ ! -d lit ]; then printf 1>&2 "%s: expected to be run from base lit directory\n" "$prog" exit 1 fi # Parse command line arguments. if [ "$1" = "--generate-html" ]; then GENERATE_HTML=1 shift fi # If invoked with no arguments, run all the tests. if [ $# = "0" ]; then set -- "tests" fi # Check that the active python has been modified to enable coverage in its # sitecustomize. if ! python -c \ 'import sitecustomize, sys; sys.exit("coverage" not in dir(sitecustomize))' \ >/dev/null 2>&1; then printf 1>&2 "error: active python does not appear to enable coverage in its 'sitecustomize.py'\n" exit 1 fi # First, remove any existing coverage data files. rm -f tests/.coverage find tests -name .coverage.\* -exec rm {} \; # Next, run the tests. lit -sv --param check-coverage=1 "$@" # Next, move all the data files from subdirectories up. find tests/* -name .coverage.\* -exec mv {} tests \; # Combine all the data files. (cd tests && python -m coverage combine) # Finally, generate the report. (cd tests && python -m coverage report) # Generate the HTML report, if requested. if [ ! -z "$GENERATE_HTML" ]; then (cd tests && python -m coverage html) fi