/
githubmirror
/
libseccomp
Обзор
Документация
Войти
/
githubmirror
/
libseccomp
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/55-basic-pfc_binary_tree.sh
46 строк
796 B
Sam James
tests: avoid use of non-portable `which`
07 янв 2024, 03:14
07 янв 2024, 03:14
47ca644
Код
Авторство
О чём код?
#!/bin/bash # # libseccomp regression test automation data # # Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. # Author: Tom Hromatka <tom.hromatka@oracle.com> # #### # functions # # Dependency check # # Arguments: # 1 Dependency to check for # function check_deps() { [[ -z "$1" ]] && return type -P "$1" >& /dev/null return $? } # # Dependency verification # # Arguments: # 1 Dependency to check for # function verify_deps() { [[ -z "$1" ]] && return if ! check_deps "$1"; then echo "error: install \"$1\" and include it in your \$PATH" exit 1 fi } #### # functions verify_deps diff # compare output to the known good output, fail if different ./55-basic-pfc_binary_tree | \ diff -q ${srcdir:=.}/55-basic-pfc_binary_tree.pfc - > /dev/null