Skip to content

Commit 393c1c3

Browse files
testing: Rename testing-utils to score_test_scenarios (#162)
* testing: Rename testing-utils to score_test_scenarios Repo was renamed * bazel: dev_dependency rework
1 parent e6842ad commit 393c1c3

File tree

4 files changed

+25
-20
lines changed

4 files changed

+25
-20
lines changed

MODULE.bazel

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ bazel_dep(name = "rules_python", version = "1.4.1")
2222

2323
PYTHON_VERSION = "3.12"
2424

25-
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
25+
python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
2626
python.toolchain(
2727
is_default = True,
2828
python_version = PYTHON_VERSION,
@@ -40,7 +40,7 @@ use_repo(pip, "pip_score_venv_test")
4040
# rust
4141
bazel_dep(name = "rules_rust", version = "0.56.0")
4242

43-
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
43+
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust", dev_dependency = True)
4444
rust.toolchain(
4545
edition = "2021",
4646
versions = ["1.85.0"],
@@ -50,37 +50,42 @@ rust.toolchain(
5050
bazel_dep(name = "rules_cc", version = "0.1.1")
5151

5252
#score gcc toolchain
53-
bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = False)
53+
bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = True)
5454

55-
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = False)
55+
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = True)
5656
gcc.toolchain(
5757
sha256 = "8fa85c2a93a6bef1cf866fa658495a2416dfeec692e4246063b791abf18da083",
5858
strip_prefix = "x86_64-unknown-linux-gnu",
5959
url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.3/x86_64-unknown-linux-gnu_gcc12.tar.gz",
6060
)
6161
use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc")
6262

63-
register_toolchains("@gcc_toolchain//:all")
63+
register_toolchains(
64+
"@gcc_toolchain//:all",
65+
dev_dependency = True,
66+
)
6467

6568
## Bazel registry
6669
# Module dependencies
67-
bazel_dep(name = "googletest", version = "1.17.0.bcr.1", dev_dependency = True)
70+
bazel_dep(name = "googletest", version = "1.17.0.bcr.1")
71+
6872
bazel_dep(name = "google_benchmark", version = "1.9.4", dev_dependency = True)
6973

7074
## S-CORE bazel registry
7175
bazel_dep(name = "score_tooling", version = "1.0.2")
7276

7377
# ToDo: implicit dependencies for score_tooling, but needed directly here??
74-
bazel_dep(name = "aspect_rules_lint", version = "1.10.2", dev_dependency = True)
75-
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2", dev_dependency = True)
78+
bazel_dep(name = "aspect_rules_lint", version = "1.10.2")
79+
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
7680

7781
# docs-as-code
7882
bazel_dep(name = "score_docs_as_code", version = "1.0.1")
7983

8084
# Provides, pytest & venv
8185
bazel_dep(name = "score_python_basics", version = "0.3.4")
82-
bazel_dep(name = "score_platform", version = "0.3.0")
83-
bazel_dep(name = "score_process", version = "1.1.0")
86+
87+
bazel_dep(name = "score_platform", version = "0.3.0", dev_dependency = True)
88+
bazel_dep(name = "score_process", version = "1.1.0", dev_dependency = True)
8489

8590
# Module deps
8691
bazel_dep(name = "score_baselibs", version = "0.1.2")
@@ -112,11 +117,11 @@ use_repo(crate, "score_persistency_crates")
112117
## temporary overrides / tools
113118
# Testing utils dependency.
114119
# Direct usage of tag in git_override reports false problem in editor, using hash of a tag
115-
bazel_dep(name = "testing-utils")
120+
bazel_dep(name = "score_test_scenarios", version = "0.3.0")
116121
git_override(
117-
module_name = "testing-utils",
118-
commit = "a847c7464cfa47e000141631d1223b92560d2e58", # tag v0.2.0
119-
remote = "https://github.com/qorix-group/testing_tools.git",
122+
module_name = "score_test_scenarios",
123+
commit = "a2f9cded3deb636f5dc800bf7a47131487119721", # tag v0.3.0
124+
remote = "https://github.com/eclipse-score/testing_tools.git",
120125
)
121126

122127
# ToDo: `-`version needed still because of indirect dependency
@@ -167,7 +172,7 @@ archive_override(
167172
],
168173
)
169174

170-
bazel_dep(name = "platforms", version = "0.0.11", dev_dependency = True)
175+
bazel_dep(name = "platforms", version = "0.0.11")
171176

172177
# Registers the custom Rust toolchain wired to @qnx_rust
173178
register_toolchains(

tests/cpp_test_scenarios/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ cc_binary(
1313
visibility = ["//tests/python_test_cases:__pkg__"],
1414
deps = [
1515
"//src/cpp/src:kvs_cpp",
16-
"@testing-utils//test_scenarios_cpp:test_scenarios_cpp",
16+
"@score_test_scenarios//test_scenarios_cpp",
1717
],
1818
)

tests/cpp_test_scenarios/src/test_basic.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ const std::string kTargetName{"cpp_test_scenarios::basic::basic"};
5252

5353
std::string BasicScenario::name() const { return "basic"; }
5454

55-
void BasicScenario::run(const std::optional<std::string>& input) const {
55+
void BasicScenario::run(const std::string& input) const {
5656
using namespace score::mw::per::kvs;
5757

5858
// Print and parse parameters.
59-
std::cerr << *input << std::endl;
59+
std::cerr << input << std::endl;
6060

61-
auto params{map_to_params(*input)};
61+
auto params{map_to_params(input)};
6262

6363
// Set builder parameters.
6464
InstanceId instance_id{params.instance_id};

tests/cpp_test_scenarios/src/test_basic.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ class BasicScenario final : public Scenario {
1111

1212
std::string name() const final;
1313

14-
void run(const std::optional<std::string>& input) const final;
14+
void run(const std::string& input) const final;
1515
};

0 commit comments

Comments
 (0)