Skip to content

Commit 031a900

Browse files
committed
Use a Lua bindings spec file for Emscripten tests.
1 parent 0478498 commit 031a900

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

tests/emscripten/bindings.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
generator "emscripten"
2+
platform "emscripten"
3+
architecture "wasm32"
4+
5+
includedirs
6+
{
7+
"..",
8+
"../../include",
9+
}
10+
11+
output "gen"
12+
13+
module "tests"
14+
namespace "test"
15+
headers
16+
{
17+
"Builtins.h",
18+
"Classes.h",
19+
"Classes2.h",
20+
"Delegates.h",
21+
"Enums.h",
22+
"Overloads.h"
23+
}

tests/emscripten/test.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ generate=true
3838

3939
if [ $generate = true ]; then
4040
echo "${green}Generating bindings${reset}"
41-
dotnet $rootdir/bin/${dotnet_configuration}_${platform}/CppSharp.CLI.dll \
42-
--gen=emscripten --platform=emscripten --arch=wasm32 --property=keywords \
43-
-I$dir/.. -I$rootdir/include -o $dir/gen -m tests $dir/../*.h
41+
dotnet $rootdir/bin/${dotnet_configuration}/CppSharp.CLI.dll --property=keywords \
42+
$dir/bindings.lua
4443
fi
4544

4645
echo "${green}Building generated binding files${reset}"

0 commit comments

Comments
 (0)