File tree Expand file tree Collapse file tree
feature_integration_tests/itf Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,9 +63,11 @@ test:ferrocene-coverage --run_under=@score_tooling//coverage:llvm_profile_wrappe
6363# Coverage needs to have all intermediate .rlibs to be able to proceed
6464build:ferrocene-coverage --remote_download_all
6565
66+ # Output only failed test logs
67+ test --test_output=errors
68+
6669test:itf-qnx-x86_64 --config=qnx-x86_64
6770test:itf-qnx-x86_64 --run_under=@score_itf//scripts:run_under_qemu
68- test:itf-qnx-x86_64 --test_output=errors
6971
7072test:unit-tests --config=linux-x86_64
7173test:unit-tests --build_tests_only
Original file line number Diff line number Diff line change 3333 - name : Checkout repository
3434 uses : actions/checkout@v4.2.2
3535
36+ - name : Set up Docker Buildx
37+ uses : docker/setup-buildx-action@v3.8.0
38+
3639 - name : Setup Bazel
3740 uses : bazel-contrib/setup-bazel@0.18.0
3841 with :
4750
4851 - name : Integration tests
4952 run : |
50- echo "NOT YET IMPLEMENTED"
53+ bazel test --config=linux-x86_64 //feature_integration_tests/itf:linux_x86_64
Original file line number Diff line number Diff line change @@ -62,3 +62,18 @@ toolchains_qnx.sdp(
6262)
6363use_repo (toolchains_qnx , "toolchains_qnx_sdp" )
6464use_repo (toolchains_qnx , "toolchains_qnx_ifs" )
65+
66+
67+ bazel_dep (name = "rules_oci" , version = "1.8.0" )
68+
69+ oci = use_extension ("@rules_oci//oci:extensions.bzl" , "oci" )
70+
71+ oci .pull (
72+ name = "ubuntu_22_04" ,
73+ digest = "sha256:3ba65aa20f86a0fad9df2b2c259c613df006b2e6d0bfcc8a146afb8c525a9751" ,
74+ image = "ubuntu" ,
75+ platforms = ["linux/amd64" ],
76+ tag = "22.04" ,
77+ )
78+
79+ use_repo (oci , "ubuntu_22_04" )
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ bazel_dep(name = "score_itf")
2525git_override(
2626 module_name = "score_itf",
2727 remote = "https://github.com/eclipse-score/itf.git",
28- commit = "1f4655af3daa85c03f91f584a3a9a1ea3ab54e62 ",
28+ commit = "e1243f3818fd78b72f79741082016fd3d7c85329 ",
2929)
3030
3131bazel_dep(name = "score_tooling")
Original file line number Diff line number Diff line change 1+ load ("@score_itf//:defs.bzl" , "py_itf_test" )
2+ load ("@score_itf//score/itf/plugins:plugins.bzl" , "docker" )
3+
4+
15filegroup (
26 name = "all_tests" ,
37 srcs = [
@@ -8,3 +12,20 @@ filegroup(
812 "//images/qnx_x86_64:__pkg__" ,
913 ],
1014)
15+
16+ py_itf_test (
17+ name = "linux_x86_64" ,
18+ srcs = [
19+ ":all_tests" ,
20+ ],
21+ args = [
22+ "--docker-image-bootstrap=$(location //images/linux_x86_64:docker_image_tarball)" ,
23+ "--docker-image=score_showcases:latest" ,
24+ ],
25+ data = [
26+ "//images/linux_x86_64:docker_image_tarball" ,
27+ ],
28+ plugins = [
29+ docker ,
30+ ],
31+ )
Original file line number Diff line number Diff line change 1313
1414import logging
1515
16+
1617logger = logging .getLogger (__name__ )
1718
1819
19- def test_showcase_app_is_deployed (target ):
20- with target .ssh () as ssh :
21- exit_code , stdout , stderr = ssh .execute_command_output ("test -f /showcases/bin/ipc_bridge_cpp" )
22- assert exit_code == 0 , "SSH command failed"
20+ def test_ipc_bridge_cpp_app_is_deployed (target ):
21+ exit_code , out = target .execute ("test -f /showcases/bin/ipc_bridge_cpp" )
22+ assert exit_code == 0
2323
2424
25- def test_showcase_app_is_running (target ):
26- with target .ssh () as ssh :
27- exit_code , stdout , stderr = ssh .execute_command_output (
28- "cd /showcases/data/comm; /showcases/bin/ipc_bridge_cpp -n 10 -t 100 -m send & /showcases/bin/ipc_bridge_cpp -n 5 -t 100 -m recv" ,
29- timeout = 30 ,
30- max_exec_time = 180 ,
31- logger_in = logger ,
32- verbose = True ,
33- )
25+ def test_ipc_bridge_cpp_app_is_running (target ):
26+ exit_code , out = target .execute (
27+ "cd /showcases/data/comm; /showcases/bin/ipc_bridge_cpp -n 10 -t 100 -m send & /showcases/bin/ipc_bridge_cpp -n 5 -t 100 -m recv"
28+ )
29+ logger .info (out )
30+ assert exit_code == 0
3431
35- logger .info (stdout )
36- logger .info (stderr )
3732
38- assert exit_code == 0 , "SSH command failed"
33+ def test_run_all_showcases (target ):
34+ exit_code , out = target .execute (
35+ "/showcases/bin/cli --examples=all"
36+ )
37+ logger .info (out )
38+ assert exit_code == 0
Original file line number Diff line number Diff line change 1010#
1111# SPDX-License-Identifier: Apache-2.0
1212# *******************************************************************************
13- # from itf.plugins.com.ping import ping
1413
14+ import score .itf
1515
16+
17+ @score .itf .plugins .core .requires_capabilities ("ssh" )
1618def test_ssh_with_default_user (target ):
1719 with target .ssh () as ssh :
1820 exit_code , stdout , stderr = ssh .execute_command_output (
@@ -26,6 +28,7 @@ def test_ssh_with_default_user(target):
2628 assert stderr == [], "Expected no error output"
2729
2830
31+ @score .itf .plugins .core .requires_capabilities ("ssh" )
2932def test_ssh_with_qnx_user (target ):
3033 user = "qnxuser"
3134 with target .ssh (username = user ) as ssh :
@@ -38,8 +41,3 @@ def test_ssh_with_qnx_user(target):
3841 "Expected QNX kernel information not found in output"
3942 )
4043 assert stderr == [], "Expected no error output"
41-
42-
43- # def test_ping_ok(target_fixture):
44- # is_reachable = ping(target_fixture.sut.ip_address)
45- # assert is_reachable, "QNX Target is not reachable via ping"
Original file line number Diff line number Diff line change 1111# SPDX-License-Identifier: Apache-2.0
1212# *******************************************************************************
1313load ("@rules_shell//shell:sh_binary.bzl" , "sh_binary" )
14+ load ("@rules_oci//oci:defs.bzl" , "oci_image" , "oci_tarball" )
15+ load ("@rules_pkg//pkg:tar.bzl" , "pkg_tar" )
1416
1517alias (
1618 name = "image" ,
@@ -27,4 +29,32 @@ sh_binary(
2729 data = [
2830 ":image" ,
2931 ],
30- )
32+ )
33+
34+ pkg_tar (
35+ name = "showcases_archive" ,
36+ srcs = [
37+ "//showcases:showcases_all" ,
38+ ],
39+ symlinks = {
40+ "showcases" : "showcases_all" ,
41+ }
42+ )
43+
44+ oci_image (
45+ name = "docker_image" ,
46+ base = "@ubuntu_22_04" ,
47+ tars = [
48+ ":showcases_archive" ,
49+ ],
50+ )
51+
52+ oci_tarball (
53+ name = "docker_image_tarball" ,
54+ image = ":docker_image" ,
55+ repo_tags = ["score_showcases:latest" ],
56+ visibility = [
57+ "//feature_integration_tests/itf:__pkg__" ,
58+ ],
59+ )
60+
Original file line number Diff line number Diff line change 118118 },
119119 "score_itf" : {
120120 "repo" : " https://github.com/eclipse-score/itf.git" ,
121- "hash" : " 1f4655af3daa85c03f91f584a3a9a1ea3ab54e62 "
121+ "hash" : " e1243f3818fd78b72f79741082016fd3d7c85329 "
122122 },
123123 "score_tooling" : {
124124 "repo" : " https://github.com/eclipse-score/tooling.git" ,
You can’t perform that action at this time.
0 commit comments