Skip to content

Commit

Permalink
Moved xml definitions to atspi-common (#165)
Browse files Browse the repository at this point in the history
* Moved `xml` definitions to `atspi-common`
*  make sure definitions are published too when we publish by adding them in `include` of
`Cargo.toml`,
* Upgrade to `zbus-lockstep` v0.4.4
* remove LOCKSTEP_XML_PATH from test and CI yaml
* reorder dependencies
  • Loading branch information
luukvanderduim authored Mar 19, 2024
1 parent c3338f4 commit 6097ab7
Show file tree
Hide file tree
Showing 29 changed files with 9 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
with:
tool: cargo-semver-checks
- name: Check Semver Compliance
run: LOCKSTEP_XML_PATH="../xml" cargo semver-checks check-release -p atspi --default-features
run: cargo semver-checks check-release -p atspi --default-features
msrv-compliance:
runs-on: ubuntu-latest
needs: [clippy,no-unused-dependencies,find-msrv]
Expand Down
16 changes: 8 additions & 8 deletions atspi-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ categories = ["accessibility", "api-bindings"]
keywords = ["Macros", "Accessibility"]
repository = "https://github.com/odilia-app/atspi"
description = "Primitive types used for sending and receiving Linux accessibility events."
license = "Apache-2.0 OR MIT"
include = ["src/**/*", "LICENSE-*", "README.md"]
license = "Apache-2.0 OR MIT"
include = ["src/**/*", "LICENSE-*", "README.md", "xml/*"]
rust-version.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -22,19 +22,19 @@ tokio = ["zbus/tokio"]
enumflags2 = "0.7.7"
serde = "1.0"
static_assertions = "1.1.0"
zbus-lockstep = "0.4.4"
zbus-lockstep-macros = "0.4.4"
zbus_names = "3.0"
zvariant = { version = "4.0", default-features = false }
zbus = { workspace = true, optional = true, default-features = false }
zbus-lockstep = "0.4.2"
zbus-lockstep-macros = "0.4.2"

[dev-dependencies]
zbus = { workspace = true }
atspi-connection = { path = "../atspi-connection" }
atspi-proxies = { path = "../atspi-proxies" }
tokio-stream = { version = "0.1", default-features = false, features = ["time"] }
tokio = { version = "1", default_features = false, features = ["macros", "rt-multi-thread"] }
rename-item = "0.1.0"
tokio-test = "0.4.2"
serde_plain = "1.0.1"
static_assertions = "1.1.0"
tokio-stream = { version = "0.1", default-features = false, features = ["time"] }
tokio = { version = "1", default-features = false, features = ["macros", "rt-multi-thread"] }
tokio-test = "0.4.2"
zbus = { workspace = true }
6 changes: 0 additions & 6 deletions atspi-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,6 @@ mod tests {
assert!(Live::try_from(-1).is_err());
}

#[test]
fn set_env_for_signature_validations() {
std::env::set_var("LOCKSTEP_XML_PATH", "../xml");
assert_eq!(std::env::var("LOCKSTEP_XML_PATH").unwrap(), "../xml");
}

#[test]
fn validate_live_signature() {
let signature = signal_body_type_signature!("Announcement");
Expand Down
7 changes: 0 additions & 7 deletions atspi-common/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ use zvariant::OwnedObjectPath;

#[tokio::test]
async fn test_recv_remove_accessible() {
std::env::set_var("LOCKSTEP_XML_PATH", "../xml");

let atspi = atspi_connection::AccessibilityConnection::new().await.unwrap();
atspi.register_event::<RemoveAccessibleEvent>().await.unwrap();
let unique_bus_name = atspi.connection().unique_name().unwrap();
Expand Down Expand Up @@ -70,9 +68,6 @@ async fn test_recv_remove_accessible() {

#[tokio::test]
async fn test_recv_add_accessible() {
// Set env variable `LOCKSTEP_XML_PATH` to the path of the XML files. See above.
std::env::set_var("LOCKSTEP_XML_PATH", "../xml");

let atspi = AccessibilityConnection::new().await.unwrap();
atspi.register_event::<AddAccessibleEvent>().await.unwrap();
let unique_bus_name = atspi.connection().unique_name().unwrap();
Expand Down Expand Up @@ -133,8 +128,6 @@ async fn test_recv_add_accessible() {
// that we can handle that case.
#[tokio::test]
async fn test_recv_add_accessible_unmarshalled_body() {
std::env::set_var("LOCKSTEP_XML_PATH", "../xml");

let atspi = AccessibilityConnection::new().await.unwrap();
atspi.register_event::<AddAccessibleEvent>().await.unwrap();
let unique_bus_name = atspi.connection().unique_name().unwrap();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6097ab7

Please sign in to comment.