File tree Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 9
9
docker-compose run --rm $TEST_ENV scripts/scalafmt --test;
10
10
docker-compose run --rm $TEST_ENV scripts/clangfmt --test;
11
11
fi
12
+ - if [[ "$TEST_ENV" = *llvm-6.0 ]]; then
13
+ docker-compose build bindgen;
14
+ scripts/docker-test.sh;
15
+ fi
12
16
13
17
matrix :
14
18
include :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Wrapper script for running the dockerized scala-native-bindgen binary.
4
+
5
+ set -euo pipefail
6
+ IFS=$' \n\t '
7
+
8
+ volumes=(
9
+ " --volume=$( pwd) :/src"
10
+ " --volume=/usr/include:/usr/include"
11
+ )
12
+
13
+ if [[ " $# " -gt 1 ]] && [[ " $1 " == /* ]]; then
14
+ volumes+=" --volume=$1 :$1 "
15
+ fi
16
+
17
+ exec docker run --rm " ${volumes[@]} " scalabindgen/scala-native-bindgen " $@ "
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Run tests similar to the BindgenSpec using the dockerized bindgen
4
+ # program.
5
+ #
6
+ # Assumes you have built the bindgen docker image by running:
7
+ #
8
+ # docker-compose build bindgen
9
+
10
+ set -euo pipefail
11
+ IFS=$' \n\t '
12
+
13
+ outdir=" tests/target/docker-samples"
14
+ rm -rf " $outdir "
15
+ mkdir " $outdir "
16
+
17
+ for input in tests/samples/* .h; do
18
+ name=" $( basename " $input " .h) "
19
+ output=" $outdir /$name .scala"
20
+ expected=" tests/samples/$name .scala"
21
+
22
+ echo " Testing $name "
23
+ scripts/docker-bindgen.sh " $input " \
24
+ --name=" $name " \
25
+ --link=bindgentests \
26
+ --package=org.scalanative.bindgen.samples \
27
+ --exclude-prefix=__ \
28
+ -- > " $output "
29
+ git diff --exit-code " $expected " " $output "
30
+ done
You can’t perform that action at this time.
0 commit comments