File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9494 if : matrix.group == 'ffi' && inputs.os == 'ubuntu-latest'
9595 run : |
9696 sudo apt update && sudo apt install -y build-essential
97- bash ffi-c-tests/validate-headers.sh
97+ bash ffi-c-tests/validate-headers.sh ./target/llvm-cov-target/debug/include
Original file line number Diff line number Diff line change 1- #include "../../target/llvm-cov-target/debug/include/ dash-spv-ffi/dash-spv-ffi.h"
1+ #include "dash-spv-ffi/dash-spv-ffi.h"
22
3- int main () {
4-
5- return 0 ;
6- }
3+ int main () { return 0 ; }
Original file line number Diff line number Diff line change 1- #include "../../target/llvm-cov-target/debug/include/ key-wallet-ffi/key-wallet-ffi.h"
1+ #include "key-wallet-ffi/key-wallet-ffi.h"
22
3- int main () {
4-
5- return 0 ;
6- }
3+ int main () { return 0 ; }
Original file line number Diff line number Diff line change 1- #include "../../target/llvm-cov-target/debug/include/ dash-spv-ffi/dash-spv-ffi.h"
2- #include "../../target/llvm-cov-target/debug/include/ key-wallet-ffi/key-wallet-ffi.h"
1+ #include "dash-spv-ffi/dash-spv-ffi.h"
2+ #include "key-wallet-ffi/key-wallet-ffi.h"
33
4- int main () {
5-
6- return 0 ;
7- }
4+ int main () { return 0 ; }
Original file line number Diff line number Diff line change @@ -8,13 +8,22 @@ NC='\033[0m'
88SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
99HEADER_TESTS_DIR=" $SCRIPT_DIR /header-tests"
1010
11- # Move to ffi-c-tests directory, where the script lives, and run tests
12- cd " $SCRIPT_DIR " || exit 1
11+ if [ $# -lt 1 ]; then
12+ echo " Usage: $0 <include_dir>"
13+ exit 1
14+ fi
15+
16+ INCLUDE_DIR=" $1 "
17+
18+ if [ ! -d " $INCLUDE_DIR " ]; then
19+ echo " Error: INCLUDE_DIR '$INCLUDE_DIR ' does not exist or is not a directory."
20+ exit 1
21+ fi
1322
1423EXIT_CODE=0
1524
1625for file in " $HEADER_TESTS_DIR " /* .c; do
17- if gcc -c " $file " -o /dev/null; then
26+ if gcc -c " $file " -I " $INCLUDE_DIR " - o /dev/null; then
1827 echo -e " ${GREEN} Passed: $file ${NC} "
1928 else
2029 echo -e " ${RED} Failed: $file ${NC} "
You can’t perform that action at this time.
0 commit comments