-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(rule | ||
(targets generated_struct_stubs.c) | ||
(action (run %{exe:struct-stub-generator/driver.exe} --c-struct-file %{targets}))) | ||
|
||
(rule | ||
(targets struct-stub-generator.exe) | ||
(deps generated_struct_stubs.c ../clib/test_functions.h ../config/test-cflags) | ||
(action (run %{cc} %{read-lines:../config/test-cflags} -I ../clib | ||
-I %{ocaml-config:standard_library} -o %{targets} generated_struct_stubs.c))) | ||
|
||
(rule | ||
(targets generated_stubs.c) | ||
(action (run %{exe:stub-generator/driver.exe} --c-file %{targets}))) | ||
|
||
(rule | ||
(targets generated_bindings.ml) | ||
(action (run %{exe:stub-generator/driver.exe} --ml-file %{targets}))) | ||
|
||
(library | ||
(name test_enums_generated) | ||
(modules generated_bindings) | ||
(c_names generated_stubs) | ||
(libraries test_functions) | ||
(wrapped false)) | ||
|
||
(test | ||
(name test_enums) | ||
(modules test_enums) | ||
(libraries ounit ctypes test_enums_generated test_enums_stubs)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(executable | ||
(name driver) | ||
(modules driver) | ||
(libraries ctypes test_enums_struct_stubs tests_common)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(library | ||
(name test_enums_struct_stubs) | ||
(wrapped false) | ||
(libraries ctypes)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(executable | ||
(name driver) | ||
(modules driver) | ||
(libraries ctypes test_enums_stubs tests_common)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(library | ||
(name test_enums_stubs) | ||
(wrapped false) | ||
(libraries ctypes.stubs test_enums_struct_stubs)) | ||
|
||
(rule | ||
(targets generated_struct_bindings.ml) | ||
(action (with-stdout-to %{targets} (run %{exe:../struct-stub-generator.exe})))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
* See the file LICENSE for details. | ||
*) | ||
|
||
[@@@warning "-33"] | ||
|
||
open OUnit2 | ||
open Ctypes | ||
|
||
|