Skip to content

Commit 51eb74a

Browse files
authored
chore: more methods in build recipe test (#54)
1 parent 82f908a commit 51eb74a

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

test/build_recipe/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ ecsact_build_recipe(
2020
},
2121
exports = [
2222
"ecsact_execute_systems",
23+
"ecsact_create_registry",
2324
],
2425
imports = [
2526
"ecsact_system_execution_context_get",
27+
"ecsact_system_execution_context_action",
2628
],
2729
)
2830

test/build_recipe/ecsact_build_test.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33

44
#include "local_dep.hh"
55

6+
ecsact_registry_id ecsact_create_registry( //
7+
const char*
8+
) {
9+
return ecsact_invalid_registry_id;
10+
}
11+
612
ecsact_execute_systems_error ecsact_execute_systems( //
713
ecsact_registry_id,
814
int,
@@ -13,5 +19,6 @@ ecsact_execute_systems_error ecsact_execute_systems( //
1319
// This is an incorrect way to use this function, but this test is only caring
1420
// about the import
1521
ecsact_system_execution_context_get(nullptr, {}, nullptr);
22+
ecsact_system_execution_context_action(nullptr, nullptr);
1623
return ECSACT_EXEC_SYS_OK;
1724
}

test/build_recipe/example-recipe.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Example Recipe
2+
3+
sources:
4+
- ecsact_build_test.cc
5+
- local_dep.cc
6+
- local_dep.hh
7+
8+
exports:
9+
- ecsact_execute_systems
10+
- ecsact_create_registry
11+
12+
imports:
13+
- ecsact_system_execution_context_get
14+
- ecsact_system_execution_context_action

test/build_recipe/test.nu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
let dir = $env.FILE_PWD;
22
let ecsact_file = $dir + '/test.ecsact';
3-
let recipe_file = $dir + '/ecsact_build_test_recipe.yml';
3+
let recipe_file = $dir + '/example-recipe.yml';
44
let output_file = $dir + '/tmp/test';
55
let temp_dir = $dir + '/tmp';
66

7-
bazel run @ecsact_cli -- build $ecsact_file -r $recipe_file -o $output_file --temp_dir $temp_dir -f text
7+
# bazel run @ecsact_cli -- build $ecsact_file -r $recipe_file -o $output_file --temp_dir $temp_dir -f text
8+
ecsact build $ecsact_file -r $recipe_file -o $output_file --temp_dir $temp_dir -f text

0 commit comments

Comments
 (0)